summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2011-04-23 21:02:08 +0200
committerBertrand Jacquin <beber@meleeweb.net>2011-04-23 21:02:08 +0200
commitd5b945da3b92f31717529620b733a28d252d4f26 (patch)
treeaef433b094faebae645de06e50c0f853125b0fd2
parentcross-i686-pc-mingw32 (diff)
downloadportage-d5b945da3b92f31717529620b733a28d252d4f26.tar.xz
jabberd2-2.2.11
-rw-r--r--net-im/jabberd2/Manifest4
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.11.init77
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.11.pamd6
-rw-r--r--net-im/jabberd2/jabberd2-2.2.11.ebuild110
4 files changed, 197 insertions, 0 deletions
diff --git a/net-im/jabberd2/Manifest b/net-im/jabberd2/Manifest
index 39e8456c..68ae4a9a 100644
--- a/net-im/jabberd2/Manifest
+++ b/net-im/jabberd2/Manifest
@@ -1,4 +1,8 @@
+AUX jabberd2-2.2.11.init 1625 RMD160 6c0f847a6b220f379244e2d47b1c0ae59615803c SHA1 fc1cf432b2a12ef924eb4707d9804c3e1d58d0e7 SHA256 38e08cc155b9a7f7781a3255f7a1bbb885fed9eb22d72a37349b5f7790cf1689
+AUX jabberd2-2.2.11.pamd 158 RMD160 3143cb1689fbebb51c0d72fa4c6b79ee9c015185 SHA1 5a95607d50b470107e9a0556fb4591688faff02c SHA256 eba4b5cc68b3dd327cfa1afdadbe5adf6d9383f4c79c7661169a4339e40b9a7b
AUX jabberd2-2.2.9.init 1625 RMD160 6c0f847a6b220f379244e2d47b1c0ae59615803c SHA1 fc1cf432b2a12ef924eb4707d9804c3e1d58d0e7 SHA256 38e08cc155b9a7f7781a3255f7a1bbb885fed9eb22d72a37349b5f7790cf1689
AUX jabberd2-2.2.9.pamd 158 RMD160 3143cb1689fbebb51c0d72fa4c6b79ee9c015185 SHA1 5a95607d50b470107e9a0556fb4591688faff02c SHA256 eba4b5cc68b3dd327cfa1afdadbe5adf6d9383f4c79c7661169a4339e40b9a7b
+DIST jabberd-2.2.11.tar.bz2 659500 RMD160 d4bac0f0cbf41788e5504ca1796f910b27c813d1 SHA1 32956231dd5ab5a242545907341fab9bc6007d22 SHA256 4be5a56ef4e582439fd2cd18c9f3149e4681765b0016f5c440ffcc017d3e47ac
DIST jabberd-2.2.9.tar.bz2 653992 RMD160 7b8075653d14dbdf491d96b28894d5450a374a91 SHA1 1da9da3305e6fd402336ffba402b80dc767afa27 SHA256 cb6cdccbdb1c9dfec247824894395370e5c1b3b10b2148ad37dc57e26a5beba4
+EBUILD jabberd2-2.2.11.ebuild 2953 RMD160 049f97138fd1740bd91451a48b4e1131d5e2beb9 SHA1 54976656407ba05fe8f87bfda8157d6cf0d45e25 SHA256 3fc5885b9d8cf74199b2263156ad9634b8cdec9222ff2f65e3cebe4158089257
EBUILD jabberd2-2.2.9.ebuild 2953 RMD160 049f97138fd1740bd91451a48b4e1131d5e2beb9 SHA1 54976656407ba05fe8f87bfda8157d6cf0d45e25 SHA256 3fc5885b9d8cf74199b2263156ad9634b8cdec9222ff2f65e3cebe4158089257
diff --git a/net-im/jabberd2/files/jabberd2-2.2.11.init b/net-im/jabberd2/files/jabberd2-2.2.11.init
new file mode 100644
index 00000000..0c64021a
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.11.init
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/files/jabberd2-2.2.8.init,v 1.1 2009/05/08 15:24:09 gentoofan23 Exp $
+
+depend() {
+ need net
+ use mysql postgresql slapd
+ provide jabber-server
+}
+
+stopJabberServices() {
+
+ eindent
+ for pidfile in /var/run/jabber/*.pid; do
+ if [ -f "${pidfile}" ]; then
+ service=$(basename ${pidfile} .pid)
+ ebegin "Stopping ${service}"
+ start-stop-daemon \
+ --stop \
+ --pidfile ${pidfile}
+ eend $?
+ fi
+ done
+ eoutdent
+
+}
+
+start() {
+
+ einfo "Starting Jabber Server ..."
+ local services
+ services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')
+ eindent
+ for service in ${services}; do
+
+ cfgfile=$(echo ${service} | cut -d ':' -f 2)
+ service=$(echo ${service} | cut -d ':' -f 1)
+ if [ ! -f "${cfgfile}" ]; then
+ if [ -f "/etc/jabber/${service}.xml" ]; then
+ cfgfile="/etc/jabber/${service}.xml"
+ else
+ eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml"
+ stopJabberServices
+ return 1
+ fi
+ fi
+
+ executable=/usr/bin/${service}
+
+ if [ ! -f "${executable}" ]; then
+ eerror "Can't find executable: ${executable}"
+ stopJabberServices
+ return 1
+ fi
+
+ ebegin "Starting ${service} (${cfgfile})"
+ start-stop-daemon \
+ --background \
+ --start \
+ --chuid jabber:jabber \
+ --exec /usr/bin/${service} \
+ --pid /var/run/jabber/$(basename ${cfgfile%.xml}).pid \
+ -- -c ${cfgfile}
+ eend $?
+
+ done
+ eoutdent
+
+}
+
+stop() {
+
+ einfo "Stopping Jabber Server"
+ stopJabberServices
+
+}
diff --git a/net-im/jabberd2/files/jabberd2-2.2.11.pamd b/net-im/jabberd2/files/jabberd2-2.2.11.pamd
new file mode 100644
index 00000000..2c5a5347
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.11.pamd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth required pam_nologin.so
+auth include system-auth
+account include system-auth
+session include system-auth
diff --git a/net-im/jabberd2/jabberd2-2.2.11.ebuild b/net-im/jabberd2/jabberd2-2.2.11.ebuild
new file mode 100644
index 00000000..14873ee6
--- /dev/null
+++ b/net-im/jabberd2/jabberd2-2.2.11.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/jabberd2-2.2.8.ebuild,v 1.1 2009/05/08 15:24:09 gentoofan23 Exp $
+
+inherit db-use eutils flag-o-matic pam
+
+DESCRIPTION="Open Source Jabber Server"
+HOMEPAGE="http://jabberd2.xiaoka.com/"
+SRC_URI="http://ftp.xiaoka.com/${PN}/releases/jabberd-${PV}.tar.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="berkdb debug memdebug mysql ldap pam postgres sqlite ssl zlib"
+
+DEPEND="dev-libs/expat
+ net-libs/udns
+ >=net-dns/libidn-0.3
+ >=virtual/gsasl-0.2.27
+ berkdb? ( >=sys-libs/db-4.1.25 )
+ mysql? ( virtual/mysql )
+ ldap? ( >=net-nds/openldap-2.1.0 )
+ pam? ( virtual/pam )
+ postgres? ( virtual/postgresql-base )
+ ssl? ( >=dev-libs/openssl-0.9.6b )
+ sqlite? ( >=dev-db/sqlite-3 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ >=net-im/jabber-base-0.01
+ !net-im/jabberd"
+
+S="${WORKDIR}/jabberd-${PV}"
+
+src_compile() {
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=207655#c3
+ replace-flags -O[3s] -O2
+
+ use berkdb && myconf="${myconf} --with-extra-include-path=$(db_includedir)"
+
+ if use debug; then
+ myconf="${myconf} --enable-debug"
+ # --enable-pool-debug is currently broken
+ use memdebug && myconf="${myconf} --enable-nad-debug"
+ else
+ if use memdebug; then
+ ewarn
+ ewarn '"memdebug" requires "debug" enabled.'
+ ewarn
+ fi
+ fi
+
+ econf \
+ --sysconfdir=/etc/jabber \
+ --enable-fs --enable-pipe --enable-anon \
+ ${myconf} \
+ $(use_enable berkdb db) \
+ $(use_enable ldap) \
+ $(use_enable mysql) \
+ $(use_enable pam) \
+ $(use_enable postgres pgsql) \
+ $(use_enable sqlite) \
+ $(use_enable ssl) \
+ $(use_with zlib)
+ emake || die "make failed"
+
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ fowners jabber:jabber /usr/bin/{jabberd,router,sm,c2s,s2s}
+ fperms 750 /usr/bin/{jabberd,router,sm,c2s,s2s}
+
+ newinitd "${FILESDIR}/${P}.init" jabberd || die "newinitd failed"
+ newpamd "${FILESDIR}/${P}.pamd" jabberd || die "newpamd failed"
+
+ dodoc AUTHORS README UPGRADE
+ docinto tools
+ dodoc tools/db-setup{.mysql,.pgsql,.sqlite}
+ dodoc tools/{migrate.pl,pipe-auth.pl}
+
+ cd "${D}/etc/jabber/"
+ sed -i \
+ -e 's,/var/lib/jabberd/pid/,/var/run/jabber/,g' \
+ -e 's,/var/lib/jabberd/log/,/var/log/jabber/,g' \
+ -e 's,/var/lib/jabberd/db,/var/spool/jabber/,g' \
+ *.xml *.xml.dist || die "sed failed"
+ sed -i \
+ -e 's,<module>mysql</module>,<module>db</module>,' \
+ c2s.xml* || die "sed failed"
+ sed -i \
+ -e 's,<driver>mysql</driver>,<driver>db</driver>,' \
+ sm.xml* || die "sed failed"
+
+}
+
+pkg_postinst() {
+
+ if use pam; then
+ echo
+ ewarn 'Jabberd-2 PAM authentication requires your unix usernames to'
+ ewarn 'be in the form of "contactname@jabberdomain". This behavior'
+ ewarn 'is likely to change in future versions of jabberd-2. It may'
+ ewarn 'be advisable to avoid PAM authentication for the time being.'
+ echo
+ ebeep
+ fi
+
+}