summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorMike Doty <kingtaco@gentoo.org>2009-01-24 14:53:23 +0000
committerMike Doty <kingtaco@gentoo.org>2009-01-24 14:53:23 +0000
commitb1874dcb976d00d3e8962e4b4da92b4a70b804a3 (patch)
treefd9b5919bb5c6e41998c8970172a83cd87dc50fe /net-im
parent keyword ~x86-fbsd (diff)
downloadgentoo-2-b1874dcb976d00d3e8962e4b4da92b4a70b804a3.tar.gz
gentoo-2-b1874dcb976d00d3e8962e4b4da92b4a70b804a3.tar.bz2
gentoo-2-b1874dcb976d00d3e8962e4b4da92b4a70b804a3.zip
version bump at tandersons(gentoofan23) request
(Portage version: 2.1.6.4/cvs/Linux 2.6.25-gentoo-r8 x86_64)
Diffstat (limited to 'net-im')
-rw-r--r--net-im/jabberd2/ChangeLog10
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.5.init77
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.5.pamd6
-rw-r--r--net-im/jabberd2/jabberd2-2.2.5.ebuild110
4 files changed, 201 insertions, 2 deletions
diff --git a/net-im/jabberd2/ChangeLog b/net-im/jabberd2/ChangeLog
index c634a44f8bc2..89407d00efdb 100644
--- a/net-im/jabberd2/ChangeLog
+++ b/net-im/jabberd2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-im/jabberd2
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.26 2008/12/13 12:23:01 bluebird Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.27 2009/01/24 14:53:23 kingtaco Exp $
+
+*jabberd2-2.2.5 (24 Jan 2009)
+
+ 24 Jan 2009; Mike Doty <kingtaco@gentoo.org> +files/jabberd2-2.2.5.init,
+ +files/jabberd2-2.2.5.pamd, +jabberd2-2.2.5.ebuild:
+ version bump at tandersons(gentoofan23) request
13 Dec 2008; Friedrich Oslage <bluebird@gentoo.org> jabberd2-2.2.4.ebuild:
Stable on sparc, bug #243096
diff --git a/net-im/jabberd2/files/jabberd2-2.2.5.init b/net-im/jabberd2/files/jabberd2-2.2.5.init
new file mode 100644
index 000000000000..e6f2032bdb97
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.5.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.5.init,v 1.1 2009/01/24 14:53:23 kingtaco 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.5.pamd b/net-im/jabberd2/files/jabberd2-2.2.5.pamd
new file mode 100644
index 000000000000..2c5a5347ad6a
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.5.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.5.ebuild b/net-im/jabberd2/jabberd2-2.2.5.ebuild
new file mode 100644
index 000000000000..7516f67222f8
--- /dev/null
+++ b/net-im/jabberd2/jabberd2-2.2.5.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.5.ebuild,v 1.1 2009/01/24 14:53:23 kingtaco 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
+
+}