summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-im/prosody/Manifest1
-rw-r--r--net-im/prosody/files/prosody-0.10.0-cfg.lua.patch41
-rw-r--r--net-im/prosody/metadata.xml1
-rw-r--r--net-im/prosody/prosody-0.10.0.ebuild83
4 files changed, 126 insertions, 0 deletions
diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest
index d9060b24ee4..008f299e1ea 100644
--- a/net-im/prosody/Manifest
+++ b/net-im/prosody/Manifest
@@ -1,3 +1,4 @@
+DIST prosody-0.10.0.tar.gz 330461 SHA256 7414e447256c60b2645578c4a5913113cd74b419ca5a032b54db90d98a978498 SHA512 ee66e240afba6a8cb286623da48d9b535798153fb65e32070cec93aafe360e91f7087eeb49dec0f7d145e24f04339ed0878e50835b52f682130b204e22990ce9 WHIRLPOOL 87236bbf3419b7de89eb8aa7471960eccb5e514ab8dfb256fad2d30865278ba437dcfc4f80f6e856c733a9cbf002af9b4d71b198afc8709d8343fca10caa983e
DIST prosody-0.9.10.tar.gz 267380 SHA256 4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f SHA512 4453fb596704b6a248a52dedc00cfc77edbee1fad502f1197b04c2148092389a294c152c3ba36203f51831d51ee2b915c15382ac86fcff4f35696ecacf926574 WHIRLPOOL 9312a0bfc856b723d02cd5a92fd4d93e3cf1f4335263d6d5d8bb8c6f44bda7b0e038cc9ad5fbdc5ea0e5623bf11b695a65b02ee4ad5134c713c05e5f4502a96c
DIST prosody-0.9.11.tar.gz 267832 SHA256 32bff4c323747f768c61b5c9a23790126d33258e96d4e589920b4c3d88b67256 SHA512 9de11e130f88d1f9a830a4cd9ad90c0176d97977c81fd7a4405ce735f12d23eaa0bb0f124ce406102c2d072247133bddf371256d696e806cac9ef4bf0821684f WHIRLPOOL 5970e61130e231d980f0d3c80ce98269b888a62da3e15ab82ed1530eece7c5af3a1726b626f3fb2dc33faeff8776bbaffb5fb2e0cd6f886c181e90cc972b5343
DIST prosody-0.9.12.tar.gz 267869 SHA256 1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d SHA512 e87b5f3b3e327722cec9d8d0470684e2ec2788a1c5ae623c4f505a00572ef21f65afe84cd5b7de47d6a65fe8872506fe34e5e8886e20979ff84710669857ca76 WHIRLPOOL 81355f1c77e8cf5537b44f5d472e44be0c906118f26476a5614252a31b23120f995e70ef1766ec4c9ae9a1bba5f24c876ad6a59e0496723533c6bacda00eb393
diff --git a/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
new file mode 100644
index 00000000000..d0600ac6d67
--- /dev/null
+++ b/net-im/prosody/files/prosody-0.10.0-cfg.lua.patch
@@ -0,0 +1,41 @@
+--- prosody-0.10.0/prosody.cfg.lua.dist 2017-10-05 11:27:20.852452270 +0200
++++ prosody-0.10.0-gentoo/prosody.cfg.lua.dist 2017-10-05 11:29:07.151997654 +0200
+@@ -1,5 +1,3 @@
+--- Prosody Example Configuration File
+---
+ -- Information on configuring Prosody can be found on our
+ -- website at https://prosody.im/doc/configure
+ --
+@@ -9,8 +7,6 @@
+ -- If there are any errors, it will let you know what and where
+ -- they are, otherwise it will keep quiet.
+ --
+--- The only thing left to do is rename this file to remove the .dist ending, and fill in the
+--- blanks. Good luck, and happy Jabbering!
+
+
+ ---------- Server-wide settings ----------
+@@ -80,6 +76,12 @@
+ --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+ }
+
++-- Settings for Gentoo init script and net-im/jabber-base permissions system:
++daemonize = true;
++prosody_user = "jabber";
++prosody_group = "jabber";
++pidfile = "/var/run/jabber/prosody.pid";
++
+ -- These modules are auto-loaded, but should you want
+ -- to disable them then uncomment them here:
+ modules_disabled = {
+@@ -161,8 +163,8 @@
+ -- Logging configuration
+ -- For advanced logging see https://prosody.im/doc/logging
+ log = {
+- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
+- error = "prosody.err";
++ info = "/var/log/jabber/prosody.log"; -- Change 'info' to 'debug' for verbose logging
++ error = "/var/log/jabber/prosody.err";
+ -- "*syslog"; -- Uncomment this for logging to syslog
+ -- "*console"; -- Log to the console, useful for debugging with daemonize=false
+ }
diff --git a/net-im/prosody/metadata.xml b/net-im/prosody/metadata.xml
index fa12c884dda..faabc3d40f1 100644
--- a/net-im/prosody/metadata.xml
+++ b/net-im/prosody/metadata.xml
@@ -14,5 +14,6 @@
<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>
+ <flag name="websocket">Add websocket support</flag>
</use>
</pkgmetadata>
diff --git a/net-im/prosody/prosody-0.10.0.ebuild b/net-im/prosody/prosody-0.10.0.ebuild
new file mode 100644
index 00000000000..d701c6edb15
--- /dev/null
+++ b/net-im/prosody/prosody-0.10.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic multilib systemd versionator
+
+MY_PV=$(replace_version_separator 3 '')
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua"
+HOMEPAGE="http://prosody.im/"
+SRC_URI="http://prosody.im/tmp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl websocket"
+
+DEPEND="net-im/jabber-base
+ websocket? ( dev-lua/LuaBitOp )
+ !jit? ( >=dev-lang/lua-5.1:0 )
+ jit? ( dev-lang/luajit:2 )
+ >=net-dns/libidn-1.1
+ !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl:= )"
+RDEPEND="${DEPEND}
+ >=dev-lua/luaexpat-1.3.0
+ dev-lua/luafilesystem
+ ipv6? ( >=dev-lua/luasocket-3 )
+ !ipv6? ( dev-lua/luasocket )
+ libevent? ( >=dev-lua/luaevent-0.4.3 )
+ mysql? ( dev-lua/luadbi[mysql] )
+ postgres? ( dev-lua/luadbi[postgres] )
+ sqlite? ( dev-lua/luadbi[sqlite] )
+ ssl? ( dev-lua/luasec )
+ zlib? ( dev-lua/lua-zlib )"
+
+S=${WORKDIR}/${MY_P}
+
+JABBER_ETC="/etc/jabber"
+JABBER_SPOOL="/var/spool/jabber"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.10.0-cfg.lua.patch"
+ sed -i -e "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = \$(PREFIX)/$(get_libdir)/!"\
+ -e "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = \$(PREFIX)/$(get_libdir)/!"\
+ Makefile || die
+}
+
+src_configure() {
+ # the configure script is handcrafted (and yells at unknown options)
+ # hence do not use 'econf'
+ append-cflags -D_GNU_SOURCE
+ luajit=""
+ if use jit; then
+ luajit="--runwith=luajit"
+ fi
+ ./configure \
+ --ostype=linux $luajit \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/lib64" \
+ --sysconfdir="${JABBER_ETC}" \
+ --datadir="${JABBER_SPOOL}" \
+ --with-lua-include=/usr/include \
+ --with-lua-lib=/usr/$(get_libdir)/lua \
+ --cflags="${CFLAGS} -Wall -fPIC" \
+ --ldflags="${LDFLAGS} -shared" \
+ --c-compiler="$(tc-getCC)" \
+ --linker="$(tc-getCC)" || die "configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ systemd_dounit "${FILESDIR}/${PN}".service
+ systemd_newtmpfilesd "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf
+ newinitd "${FILESDIR}/${PN}".initd-r2 ${PN}
+}
+
+src_test() {
+ cd tests || die
+ ./run_tests.sh || die
+}