From a4c3777bc5014d9a47514b1862acfc6c0e9a71a8 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 27 Mar 2011 04:19:43 +0200 Subject: Fix ld-bug in prosody --- net-im/prosody/Manifest | 5 ++ net-im/prosody/files/prosody-0.6.2-cfg.lua.patch | 17 +++++++ net-im/prosody/files/prosody-0.7.0-cfg.lua.patch | 39 +++++++++++++++ net-im/prosody/files/prosody.initd | 46 ++++++++++++++++++ net-im/prosody/prosody-0.7.0.ebuild | 61 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 net-im/prosody/Manifest create mode 100644 net-im/prosody/files/prosody-0.6.2-cfg.lua.patch create mode 100644 net-im/prosody/files/prosody-0.7.0-cfg.lua.patch create mode 100644 net-im/prosody/files/prosody.initd create mode 100644 net-im/prosody/prosody-0.7.0.ebuild (limited to 'net-im/prosody') diff --git a/net-im/prosody/Manifest b/net-im/prosody/Manifest new file mode 100644 index 0000000..7aa047e --- /dev/null +++ b/net-im/prosody/Manifest @@ -0,0 +1,5 @@ +AUX prosody-0.6.2-cfg.lua.patch 637 RMD160 b3bdeaffbb8318debd9e99d006451ae9fb3cb514 SHA1 355faa0dfee2616c4a30a2393f5879c70666d572 SHA256 06057f56a0858b2d4596de874b8ea3465a984fe3dbebab0d58a10359c74dd94d +AUX prosody-0.7.0-cfg.lua.patch 1517 RMD160 ea1e8459c61d93e1b196177a42f089e153c79f8e SHA1 635bdc90428249d5846eabaf7cb8bac975dee3c5 SHA256 5bc54faaf365be5a3568f201fa53f0ff094bb51bb4d8300cdca60ec8aaffb4e8 +AUX prosody.initd 1148 RMD160 54de6d4b97600024cfd8624fa10240a1e0a430e8 SHA1 c75e361c36e27adc880517d02a0e3089f200fd97 SHA256 e520a55d4a10fc7fce24ce7b57e722846d2814e6726407acba606af519de19e8 +DIST prosody-0.7.0.tar.gz 177412 RMD160 2e40b4f807b6120971c611f52d4df3264a82cbb9 SHA1 3f3a6c4f262a062a9c027cc843cd6827104fb8ba SHA256 a8b826805dd55282706c5683c2028899b3721eb0f84d3e35c0509a6c1bc32390 +EBUILD prosody-0.7.0.ebuild 1876 RMD160 0c46a2ebac061efe5f5ebf6726f8380d33fbcddd SHA1 3e9f873d1365e0c813189de3cdc9e0ae3aa0093d SHA256 66312b4b5e03b82f885d5257f35570ef4ad662776252bcb4f0b772b6fd59b332 diff --git a/net-im/prosody/files/prosody-0.6.2-cfg.lua.patch b/net-im/prosody/files/prosody-0.6.2-cfg.lua.patch new file mode 100644 index 0000000..338daef --- /dev/null +++ b/net-im/prosody/files/prosody-0.6.2-cfg.lua.patch @@ -0,0 +1,17 @@ +--- prosody.cfg.lua.old 2010-05-27 11:10:45.000000000 +0200 ++++ prosody.cfg.lua.dist 2010-05-27 11:12:21.000000000 +0200 +@@ -16,6 +16,14 @@ + -- Settings in this section apply to the whole server and are the default settings + -- for any virtual hosts + ++prosody_user = "jabber" ++prosody_group = "jabber" ++pidfile = "/var/run/jabber/prosody.pid" ++ ++log = "/var/log/jabber/prosody.log" ++-- Requires mod_posix to be loaded ++-- log = "*syslog" ++ + -- This is a (by default, empty) list of accounts that are admins + -- for the server. Note that you must create the accounts separately + -- (see http://prosody.im/doc/creating_accounts for info) diff --git a/net-im/prosody/files/prosody-0.7.0-cfg.lua.patch b/net-im/prosody/files/prosody-0.7.0-cfg.lua.patch new file mode 100644 index 0000000..68423f4 --- /dev/null +++ b/net-im/prosody/files/prosody-0.7.0-cfg.lua.patch @@ -0,0 +1,39 @@ +--- prosody.cfg.lua.old 2010-06-13 02:23:02.000000000 +0200 ++++ prosody.cfg.lua.dist 2010-06-18 10:45:40.165045845 +0200 +@@ -16,6 +16,10 @@ + -- Settings in this section apply to the whole server and are the default settings + -- for any virtual hosts + ++prosody_user = "jabber" ++prosody_group = "jabber" ++pidfile = "/var/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 http://prosody.im/doc/creating_accounts for info) +@@ -26,6 +30,14 @@ + -- For more information see: http://prosody.im/doc/libevent + --use_libevent = true; + ++-- Enable the Cyrus SASL backend for authentication against different backends, ++-- such as PAM, LDAP, SQL and more. ++-- It also allows the use of GSSAPI for single-sign-on services. ++-- For more information see: http://prosody.im/doc/cyrus_sasl ++--sasl_backend = "cyrus" ++-- Optional, defaults to "xmpp" ++--cyrus_service_name = "xmpp" ++ + -- 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. + -- Documentation on modules can be found at: http://prosody.im/doc/modules +@@ -90,7 +102,9 @@ + + -- Logging configuration + -- For advanced logging see http://prosody.im/doc/logging +-log = "prosody.log"; ++log = "/var/log/jabber/prosody.log" ++-- Requires mod_posix to be loaded ++-- log = "*syslog" + debug = false; -- Log debug messages? + + ----------- Virtual hosts ----------- diff --git a/net-im/prosody/files/prosody.initd b/net-im/prosody/files/prosody.initd new file mode 100644 index 0000000..02a1fdc --- /dev/null +++ b/net-im/prosody/files/prosody.initd @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/prosody/files/prosody.initd,v 1.1 2010/05/27 11:47:12 djc Exp $ + +description="Prosody is a server for Jabber/XMPP written in Lua." +description_reload="Reload configuration and reopen log files." +extra_started_commands="reload" + +PIDFILE="/var/run/jabber/prosody.pid" +USER="jabber" +COMMAND="/usr/bin/prosody" + +depend() { + use dns + need net + provide jabber-server +} + +checkconfig() { + if [ ! -e /etc/jabber/prosody.cfg.lua ] ; then + eerror "You need a /etc/jabber/prosody.cfg.lua file to run prosody" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Prosody XMPP Server" + start-stop-daemon --start -b --pidfile ${PIDFILE} \ + --make-pidfile --user ${USER} --exec ${COMMAND} + eend $? +} + +stop() { + ebegin "Stopping Prosody XMPP Server" + start-stop-daemon --stop --pidfile ${PIDFILE} \ + --user ${USER} --exec ${COMMAND} + eend $? +} + +reload() { + ebegin "Reloading configuration of Prosody XMPP Server" + start-stop-daemon --pidfile ${PIDFILE} --signal HUP + eend $? +} diff --git a/net-im/prosody/prosody-0.7.0.ebuild b/net-im/prosody/prosody-0.7.0.ebuild new file mode 100644 index 0000000..f5fa92b --- /dev/null +++ b/net-im/prosody/prosody-0.7.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/prosody/prosody-0.7.0.ebuild,v 1.2 2011/03/22 20:59:44 ulm Exp $ + +EAPI="2" + +inherit eutils multilib toolchain-funcs versionator + +MY_PV=$(replace_version_separator 3 '') +DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua." +HOMEPAGE="http://prosody.im/" +SRC_URI="http://prosody.im/downloads/source/${PN}-${MY_PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libevent ssl" + +DEPEND="net-im/jabber-base + >=dev-lang/lua-5.1 + dev-lua/luasocket + ssl? ( dev-lua/luasec ) + dev-lua/luaexpat + dev-lua/luafilesystem + libevent? ( dev-lua/luaevent ) + >=net-dns/libidn-1.1 + >=dev-libs/openssl-0.9.8" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}-${MY_PV}" + +JABBER_ETC="/etc/jabber" +JABBER_SPOOL="/var/spool/jabber" + +src_prepare() { + epatch "${FILESDIR}/${P}-cfg.lua.patch" + useq libevent && sed -i "s!--use_libevent.*!use_libevent = true!" prosody.cfg.lua.dist + sed -i "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!" Makefile + sed -i "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!" Makefile + sed -i "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = \$(PREFIX)/$(get_libdir)/!" Makefile + sed -i "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = \$(PREFIX)/$(get_libdir)/!" Makefile +} + +src_configure() { + ./configure --prefix="/usr" \ + --sysconfdir="${JABBER_ETC}" \ + --datadir="${JABBER_SPOOL}" \ + --with-lua-lib=/usr/$(get_libdir)/lua \ + --c-compiler="$(tc-getCC)" --linker="$(tc-getCC)" \ + --require-config || die "configure failed" +} + +src_install() { + DESTDIR="${D}" emake install || die "make failed" + newinitd "${FILESDIR}/${PN}".initd ${PN} +} + +src_test() { + cd tests + ./run_tests.sh +} -- cgit v1.2.3-70-g09d2