summaryrefslogtreecommitdiff
path: root/net-im/prosody
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/prosody')
-rw-r--r--net-im/prosody/Manifest13
-rw-r--r--net-im/prosody/files/prosody-0.11.2-r1-gentoo.patch (renamed from net-im/prosody/files/prosody_cfg-0.11.2-r1.patch)0
-rw-r--r--net-im/prosody/files/prosody-0.11.7-bit32.patch20
-rw-r--r--net-im/prosody/files/prosody-0.11.7-gentoo.patch29
-rw-r--r--net-im/prosody/files/prosody.initd-r443
-rw-r--r--net-im/prosody/files/prosody.service-r213
-rw-r--r--net-im/prosody/files/prosody.tmpfilesd-r11
-rw-r--r--net-im/prosody/metadata.xml22
-rw-r--r--net-im/prosody/prosody-0.11.5-r1.ebuild (renamed from net-im/prosody/prosody-0.11.5.ebuild)4
-rw-r--r--net-im/prosody/prosody-0.11.7-r2.ebuild96
10 files changed, 230 insertions, 11 deletions
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index 534435906d86..f584250e93e6 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1,7 +1,14 @@
+AUX prosody-0.11.2-r1-gentoo.patch 726 BLAKE2B dd9c68bcb49184d01d24530cb6f239b21bb3fe16c8bac4bc18a56e095750911e96257966f74eb07d21327f9a5799dbd7360b9ca54c9b27ed6a0e64d3b575fdf3 SHA512 87ccbe199b72ca8d3d8bb3d60dfc8dab7502cd98fa56fb7cbdbc760a4cd46e9e3ddce8612dbf9927230f1595ca63e31b84f6e3fe185fe2537d42d99c38672dff
+AUX prosody-0.11.7-bit32.patch 599 BLAKE2B 880d11d8730f77322372efbfdb80c64a523844a47aae60a0f04b831262dc2e61c141247902b0872ff73fa02497dbfc75e3fc0cdbf9396c124c6c080bbbe181cd SHA512 e1783fceaca93acde37a3fffc5052eb9799faff59ce13e394358a21f24513e193ffa498218766b87718bac55f6425694106494abf05080203c5af01a52c03edb
+AUX prosody-0.11.7-gentoo.patch 1419 BLAKE2B 30a1ef43f6d3b00a07f621dc701e97ba45fb8b6d6ed67f95e5feff7bad32a4d037f0d00301c60bb05e1d5cb85bc1b78451ca0a989d7fda893f8b433ee50cc2f5 SHA512 9f5490ce156ef7d69f8daee7f274edc4d56da93dcbcfaf1a28f33ee8a0b5c6cb6a8f4f6f50cfd0cd3defad1ae90603803e6328ca3e160c4b3fa6aeadbd7104f3
AUX prosody.initd-r2 1067 BLAKE2B 64293637d5afaa5805cdfe3f2083aaa25fcd1611ce6dfeee09c939a2c9449a7f5994d984ed68ffbd015344db8f99fc9e5f5a16c4196d767c1768140d4880becc SHA512 6e16462a39fb72bbf7b312b5e02ea1ca766576b18ab0304e48fc8e123c4241fad1d784266d00b63a25ac7d36524cedbf5eb0cafe3a7e745082b50b87a2a9a9da
+AUX prosody.initd-r4 955 BLAKE2B 4d9a7e9cda70a901478734a7ba81480374e9a4db069a91920f03fa2de35b85f3d6f62c7e85ee622646d77c660f039370217e968e5a3d6d88c6e9ab20e6362ea3 SHA512 a0e92aaba052c50748911caf0005b154eb14c6af142a36492c938da04633c5ac397f1baebe133f366b7fc9547e360265ade75ab58bcaf7bffeca7c84f98547b6
AUX prosody.service 275 BLAKE2B f1d889d59f507c990f0dddd8811465e2729fd4d7acde83204a0976affe8471707a64eaaeab31f458e526cebd7860aa470738008682a8e4363f86092f96d60d74 SHA512 0e16a20363aa13eb48bac2a60be6308f56501835dad021de5492aee80ec31bdda044928b76ef50ad359bc1e0d0593f15ff47ea683a345fef4bde2602a2da0f6c
+AUX prosody.service-r2 228 BLAKE2B 61741cb7ecf64777b516a1fcb4e8e8c5c7b9c5d92dafbf7f691c36910f41d0b81d701bf8f287aea89fa368071c0c94a38f56ff3134055eb01842b578d8b57991 SHA512 0499588d1fd6e970575785b4bdaf631428601bec8a57051558c1d4c82bc74462f17d7568b8d433b14f15c51c94b181f4240d9f4574d51dcfeda291f0a68eb6f1
AUX prosody.tmpfilesd 38 BLAKE2B adf773737f29277af7940129ba41bcd48481ae053858b72b9a308fcb2a29e56cfb534d3b147ce4962a5aa62a52873245be622c800f1b1a8b714890f359a625a3 SHA512 a3e067a905b3f0221077fee7d2acb709082e464892981fac316e5fde204150ab922e76ead75881c0f1aa925219d62b966756f75dc68406d8af27f7cd883dd4bc
-AUX prosody_cfg-0.11.2-r1.patch 726 BLAKE2B dd9c68bcb49184d01d24530cb6f239b21bb3fe16c8bac4bc18a56e095750911e96257966f74eb07d21327f9a5799dbd7360b9ca54c9b27ed6a0e64d3b575fdf3 SHA512 87ccbe199b72ca8d3d8bb3d60dfc8dab7502cd98fa56fb7cbdbc760a4cd46e9e3ddce8612dbf9927230f1595ca63e31b84f6e3fe185fe2537d42d99c38672dff
+AUX prosody.tmpfilesd-r1 36 BLAKE2B dfb5025508cc62b4cd53de35b83f47bfee61821fbfe3301c1b67a4324ab753067cd3ecd84f56ae9a0241395a50d90ce2ec49c9333dc3378798a290e638a56cf9 SHA512 13a99fb925f7c3584dbfcbc98b3b929b67e165f70d700a25a861e512becd8a21ca48ee385da67ead23beeb68a43aaa10a2cfd342d1b3184883fede5d985cb599
DIST prosody-0.11.5.tar.gz 425122 BLAKE2B d65720a0c9d533a4be70847b690ecf037ae4b2fcbd090c81e2346d515599f3f148061103df2ffe46122a55694a3d35d53ab2b379fb5fb317e3b84a0ff5e82c29 SHA512 43a9facee8d61b69e277e7e8a9091fbfa60be71d6141195dff991f6020c8afadacce26f356b869cb2d7edd9be285e9ce1bcd822f9628cc845d91757e818a0dff
-EBUILD prosody-0.11.5.ebuild 2083 BLAKE2B 98e9e34bbc9b8a46991f4baf8602b2d9ceda94fbd25122f344f816ad82c1032b1cdd8298ee017726ebb2b142bcf0240ed02fc0157aca9e5e2e5b141780c814b3 SHA512 007c3fc6a4ac1a8aff92cafccb6b3943195d37d10dd7924676827ef78bf5264f4ffec167205292106ae83959208205ffe74226303641ebb1ccd013b2117338aa
-MISC metadata.xml 399 BLAKE2B 01895e1bb6fb8aea8167fe0a060f38524b62d8a6fddd82e22997ca2c81cb4f9c1273d442577028a806cba765feac1c9934a840473097a88bbc027dc5315c7353 SHA512 da3f21781934c83f3971fc36cab54e6179571e79a330c18ef1ab00556f962f7cd1032d2c3355f1d8225d39ea6e9d5d48afa8e90698d6320216eea71bcada8d22
+DIST prosody-0.11.7.tar.gz 429369 BLAKE2B 8ef7377810702d5e1f480d84c09d6e3cc6aab674cca56fc1ce5e211d32df63ffeb57869c9d98429a81ea715ee19fca2ac015daa6b88b8c140efbeccb906defa6 SHA512 923aa92598ef851ed8408931942859f78f1e3d700fee251f4f5ca67abdcdae43448318ed90a9a1cdc7824d5f4dc5a4732fad4b9ed36d97455fa9b3bff0881a20
+EBUILD prosody-0.11.5-r1.ebuild 2085 BLAKE2B 635d42bd9df55770be24797e63666c07e6c16f240be5a641164f29de52bbb3dd8e070f9cf708a947482267d592c27adc92f2dc64903d8cdbff7fc90be504420b SHA512 6b0fdfc3901f2227007408108e7f647218dbe5ea06aae3ffeb197b92837cdded1841f39a1bb990235149c7c7ae9784002e60b5fca1bc540f8ce27886a4514761
+EBUILD prosody-0.11.7-r2.ebuild 2255 BLAKE2B 3cf800b91388298466fab32cbfc1b641057e4c2ae1f70881c798eac63e6b14587503568ddfec8126281427a1685eb7c69125a63f3c4e1fd95942975b1360b747 SHA512 1c16147d722315050c6077e4886a7394eac85bf21ac51aa43a97de1818376356cd0e9d0b48cafe387dd8bdc3204b4e564c89545da045665e8af7edd288537ef4
+MISC metadata.xml 729 BLAKE2B e5e7c82e24858e3eb11b087a17c3e5d7ceebb7fbbdfa9d69346f26f341e422e0a109416ac062eeed750b0c29f93fd60608cdf41283cd7a1a90519217e9230bf3 SHA512 ecfdb898917fcc56b041ce93331e96708129172c7ff447cb7ead1636f83c4abee655fb8a166a81c9e97cc189363e1cea5e1ba08bf54a491f5e5c5a60c5b3cbe4
diff --git a/net-im/prosody/files/prosody_cfg-0.11.2-r1.patch b/net-im/prosody/files/prosody-0.11.2-r1-gentoo.patch
index 94423a834ae1..94423a834ae1 100644
--- a/net-im/prosody/files/prosody_cfg-0.11.2-r1.patch
+++ b/net-im/prosody/files/prosody-0.11.2-r1-gentoo.patch
diff --git a/net-im/prosody/files/prosody-0.11.7-bit32.patch b/net-im/prosody/files/prosody-0.11.7-bit32.patch
new file mode 100644
index 000000000000..fb7b55f6bbef
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.11.7-bit32.patch
@@ -0,0 +1,20 @@
+# HG changeset patch
+# User Kim Alvefur <zash@zash.se>
+# Date 1601928749 -7200
+# Node ID e17b98feb0b7cad6539ee25c5cc7728911349a6d
+# Parent c3eefb517b7b934dbf4f78244c18f7e91b852846
+util.dependencies: Check for bitop library same way as net.websocket.frames (fixes #1594)
+
+diff -r c3eefb517b7b -r e17b98feb0b7 util/dependencies.lua
+--- a/util/dependencies.lua
++++ b/util/dependencies.lua
+@@ -90,7 +90,7 @@
+ }, "SSL/TLS support will not be available");
+ end
+
+- local bit = _G.bit32 or softreq"bit";
++ local bit = softreq"bit" or softreq"bit32";
+
+ if not bit then
+ missingdep("lua-bitops", {
+
diff --git a/net-im/prosody/files/prosody-0.11.7-gentoo.patch b/net-im/prosody/files/prosody-0.11.7-gentoo.patch
new file mode 100644
index 000000000000..e571066874b7
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.11.7-gentoo.patch
@@ -0,0 +1,29 @@
+--- a/prosody.cfg.lua.dist
++++ b/prosody.cfg.lua.dist
+@@ -17,6 +17,15 @@
+ -- Settings in this section apply to the whole server and are the default settings
+ -- for any virtual hosts
+
++-- Prosody will use this user and group for launching the service.
++-- Gentoo uses by default jabber:jabber (uid:gid) for all Jabber related services.
++prosody_user = "jabber"
++prosody_group = "jabber"
++
++-- Prosody will create this pid file after it has been successfully started.
++-- Please don't change that path, as it's being used by the Gentoo init scripts.
++pidfile = "/run/jabber/prosody.pid"
++
+ -- This is a (by default, empty) list of accounts that are admins
+ -- for the server. Note that you must create the accounts separately
+ -- (see https://prosody.im/doc/creating_accounts for info)
+@@ -30,7 +39,9 @@
+ -- Prosody will always look in its source directory for modules, but
+ -- this option allows you to specify additional locations where Prosody
+ -- will look for modules first. For community modules, see https://modules.prosody.im/
+---plugin_paths = {}
++-- The default included path is for the optional net-im/prosody-modules package,
++-- which provides additional community maintained modules.
++plugin_paths = { "/usr/GENTOO_LIBDIR/prosody/community-modules" };
+
+ -- This is the list of modules Prosody will load on startup.
+ -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
diff --git a/net-im/prosody/files/prosody.initd-r4 b/net-im/prosody/files/prosody.initd-r4
new file mode 100644
index 000000000000..1282e9dc4561
--- /dev/null
+++ b/net-im/prosody/files/prosody.initd-r4
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="Prosody XMPP server"
+extra_started_commands="reload"
+jabber_pid="/run/jabber"
+jabber_logs="/var/log/jabber"
+pidfile="${jabber_pid}/prosody.pid"
+prosody_config="/etc/jabber/prosody.cfg.lua"
+
+command="/usr/bin/prosody"
+command_group="jabber"
+command_user="jabber"
+
+checkconfig() {
+ if [ ! -f "${prosody_config}" ]; then
+ eerror "Please create ${prosody_config} before starting Prosody!"
+ return 1
+ fi
+
+ luac -p "${prosody_config}"
+ return $?
+}
+
+depend() {
+ need net
+ provide jabber-server
+ use dns postgresql
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${jabber_logs}"
+ checkpath -d -m 0750 -o "${command_user}:${command_group}" -q "${jabber_pid}"
+}
diff --git a/net-im/prosody/files/prosody.service-r2 b/net-im/prosody/files/prosody.service-r2
new file mode 100644
index 000000000000..81408beefe53
--- /dev/null
+++ b/net-im/prosody/files/prosody.service-r2
@@ -0,0 +1,13 @@
+[Unit]
+Description=Prosody XMPP server
+After=network.target
+
+[Service]
+Group=jabber
+PIDFile=/run/jabber/prosody.pid
+ExecStart=/usr/bin/prosody
+ExecReload=/bin/kill -HUP $MAINPID
+User=jabber
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/prosody/files/prosody.tmpfilesd-r1 b/net-im/prosody/files/prosody.tmpfilesd-r1
new file mode 100644
index 000000000000..7fcdd539decc
--- /dev/null
+++ b/net-im/prosody/files/prosody.tmpfilesd-r1
@@ -0,0 +1 @@
+d /run/jabber 750 jabber jabber - -
diff --git a/net-im/prosody/metadata.xml b/net-im/prosody/metadata.xml
index 469f03f567b7..d73f165dd534 100644
--- a/net-im/prosody/metadata.xml
+++ b/net-im/prosody/metadata.xml
@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <use>
- <flag name="libevent">Use libevent for event handling</flag>
- <flag name="zlib">Support for compressing XMPP streams with mod_compression</flag>
- <flag name="jit">Use LuaJIT instead of vanilla Lua</flag>
- </use>
+ <maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <longdescription>
+ Prosody is a modern XMPP communication server.
+ It aims to be easy to set up and configure,
+ and efficient with system resources.
+ Additionally, for developers it aims to be easy to extend
+ and give a flexible system on which to rapidly develop
+ added functionality, or prototype new protocols.
+ </longdescription>
+ <use>
+ <flag name="jit">Use LuaJIT instead of vanilla Lua</flag>
+ <flag name="libevent">Use libevent for event handling</flag>
+ </use>
</pkgmetadata>
diff --git a/net-im/prosody/prosody-0.11.5.ebuild b/net-im/prosody/prosody-0.11.5-r1.ebuild
index 77ea1552347c..6ffc3bd7b489 100644
--- a/net-im/prosody/prosody-0.11.5.ebuild
+++ b/net-im/prosody/prosody-0.11.5-r1.ebuild
@@ -27,7 +27,7 @@ DEPEND="${BASE_DEPEND}
test? ( dev-lua/busted )"
RDEPEND="${BASE_DEPEND}
- >=dev-lua/luaexpat-1.3.0
+ ~dev-lua/luaexpat-1.3.0
dev-lua/luafilesystem
!ipv6? ( dev-lua/luasocket )
ipv6? ( >=dev-lua/luasocket-3 )
@@ -38,7 +38,7 @@ RDEPEND="${BASE_DEPEND}
ssl? ( dev-lua/luasec )
zlib? ( dev-lua/lua-zlib )"
-PATCHES=("${FILESDIR}/prosody_cfg-0.11.2-r1.patch")
+PATCHES=( "${FILESDIR}/${PN}-0.11.2-r1-gentoo.patch" )
JABBER_ETC="/etc/jabber"
JABBER_SPOOL="/var/spool/jabber"
diff --git a/net-im/prosody/prosody-0.11.7-r2.ebuild b/net-im/prosody/prosody-0.11.7-r2.ebuild
new file mode 100644
index 000000000000..9453002bf47b
--- /dev/null
+++ b/net-im/prosody/prosody-0.11.7-r2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="Prosody is a modern XMPP communication server"
+HOMEPAGE="https://prosody.im/"
+SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 x86"
+IUSE="+libevent libressl luajit mysql postgres +sqlite +ssl test +zlib"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ || (
+ >=dev-lang/lua-5.2:*
+ dev-lua/lua-bit32
+ )
+ net-dns/libidn
+ net-im/jabber-base
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( dev-lang/lua:0 )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-lua/busted )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lua/luaexpat
+ dev-lua/luafilesystem
+ dev-lua/luasocket
+ libevent? ( dev-lua/luaevent )
+ mysql? ( dev-lua/luadbi[mysql] )
+ postgres? ( dev-lua/luadbi[postgres] )
+ sqlite? ( dev-lua/luadbi[sqlite] )
+ ssl? ( dev-lua/luasec )
+ zlib? ( dev-lua/lua-zlib )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.11.7-bit32.patch"
+ "${FILESDIR}/${PN}-0.11.7-gentoo.patch"
+)
+
+src_prepare() {
+ default
+
+ # Set correct plugin path for optional net-im/prosody-modules package
+ sed -e "s/GENTOO_LIBDIR/$(get_libdir)/g" -i prosody.cfg.lua.dist || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --c-compiler="$(tc-getCC)"
+ --datadir="${EPREFIX}/var/spool/jabber"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ --linker="$(tc-getCC)"
+ --ostype="linux"
+ --prefix="${EPREFIX}/usr"
+ --runwith="$(usex luajit luajit lua)"
+ --sysconfdir="${EPREFIX}/etc/jabber"
+ --with-lua-include="${EPREFIX}/usr/include"
+ --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua"
+ )
+
+ # Since the configure script is handcrafted,
+ # and yells at unknown options, do not use 'econf'.
+ ./configure ${myeconfargs[@]} --cflags="${CFLAGS} -Wall -fPIC" --ldflags="${LDFLAGS} -shared" || die
+
+ rm makefile || die
+ mv GNUmakefile Makefile || die
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/prosody.initd-r4 prosody
+ systemd_newunit "${FILESDIR}"/prosody.service-r2 prosody.service
+
+ newtmpfiles "${FILESDIR}"/prosody.tmpfilesd-r1 prosody.conf
+
+ keepdir /var/spool/jabber
+}
+
+pkg_postinst() {
+ tmpfiles_process prosody.conf
+}