summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-11-01 21:50:22 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-11-01 21:50:22 +0000
commitc4732b0e0c867736a17762a489d417c73d6ebe5b (patch)
treeb9194f13203170a3667f088746687dea2415edc6 /net-im/jabberd2
parentStable for alpha, wrt bug #488630 (diff)
downloadgentoo-2-c4732b0e0c867736a17762a489d417c73d6ebe5b.tar.gz
gentoo-2-c4732b0e0c867736a17762a489d417c73d6ebe5b.tar.bz2
gentoo-2-c4732b0e0c867736a17762a489d417c73d6ebe5b.zip
version bump wrt #314473 and #432936
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'net-im/jabberd2')
-rw-r--r--net-im/jabberd2/ChangeLog8
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.17.init81
-rw-r--r--net-im/jabberd2/files/jabberd2-2.2.17.logrotate10
-rw-r--r--net-im/jabberd2/jabberd2-2.2.17.ebuild126
-rw-r--r--net-im/jabberd2/metadata.xml4
5 files changed, 226 insertions, 3 deletions
diff --git a/net-im/jabberd2/ChangeLog b/net-im/jabberd2/ChangeLog
index 5bf20b2c76d4..dcadbb1f2bfa 100644
--- a/net-im/jabberd2/ChangeLog
+++ b/net-im/jabberd2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-im/jabberd2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.42 2013/09/14 10:40:21 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/ChangeLog,v 1.43 2013/11/01 21:50:22 hasufell Exp $
+
+*jabberd2-2.2.17 (01 Nov 2013)
+
+ 01 Nov 2013; Julian Ospald <hasufell@gentoo.org> +jabberd2-2.2.17.ebuild,
+ +files/jabberd2-2.2.17.init, +files/jabberd2-2.2.17.logrotate, metadata.xml:
+ version bump wrt #314473 and #432936
14 Sep 2013; Agostino Sarubbo <ago@gentoo.org> jabberd2-2.2.14-r1.ebuild:
Stable for sparc, wrt bug #369739
diff --git a/net-im/jabberd2/files/jabberd2-2.2.17.init b/net-im/jabberd2/files/jabberd2-2.2.17.init
new file mode 100644
index 000000000000..32cb1777dd60
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.17.init
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2013 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.17.init,v 1.1 2013/11/01 21:50:22 hasufell 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_pre() {
+ checkpath -d -o jabber /var/run/jabber
+}
+
+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 \
+ --user 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.17.logrotate b/net-im/jabberd2/files/jabberd2-2.2.17.logrotate
new file mode 100644
index 000000000000..0ce109263fbe
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.2.17.logrotate
@@ -0,0 +1,10 @@
+/var/log/jabber/c2s.log /var/log/jabber/s2s.log /var/log/jabber/sm.log /var/log/jabber/router.log {
+ su jabber jabber
+ sharedscripts
+ postrotate
+ kill -HUP $(cat /var/run/jabberd/c2s.pid)
+ kill -HUP $(cat /var/run/jabberd/s2s.pid)
+ kill -HUP $(cat /var/run/jabberd/sm.pid)
+ kill -HUP $(cat /var/run/jabberd/router.pid)
+ endscript
+}
diff --git a/net-im/jabberd2/jabberd2-2.2.17.ebuild b/net-im/jabberd2/jabberd2-2.2.17.ebuild
new file mode 100644
index 000000000000..6a8a47a6d5a0
--- /dev/null
+++ b/net-im/jabberd2/jabberd2-2.2.17.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/jabberd2-2.2.17.ebuild,v 1.1 2013/11/01 21:50:22 hasufell Exp $
+
+EAPI=5
+
+inherit db-use eutils flag-o-matic pam
+
+DESCRIPTION="Open Source Jabber Server"
+HOMEPAGE="http://jabberd2.org"
+SRC_URI="mirror://github/jabberd2/jabberd2/jabberd-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="berkdb debug memdebug mysql ldap pam postgres sqlite ssl test zlib"
+REQUIRED_USE="memdebug? ( debug )"
+
+# broken
+RESTRICT="test"
+
+DEPEND="dev-libs/expat
+ net-libs/udns
+ net-dns/libidn
+ virtual/gsasl
+ berkdb? ( >=sys-libs/db-4.1.25 )
+ ldap? ( net-nds/openldap )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ ssl? ( dev-libs/openssl:0 )
+ sqlite? ( dev-db/sqlite:3 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ >=net-im/jabber-base-0.01"
+DEPEND="${DEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+
+DOCS=( AUTHORS README UPGRADE )
+
+S=${WORKDIR}/jabberd-${PV}
+
+src_configure() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=207655#c3
+ replace-flags -O[3s] -O2
+
+ # --enable-pool-debug is currently broken
+ econf \
+ --sysconfdir=/etc/jabber \
+ $(usex debug "--enable-debug" "") \
+ $(usex memdebug "--enable-nad-debug" "") \
+ $(use_enable ssl) \
+ $(use_enable mysql) \
+ $(use_enable postgres pgsql) \
+ $(use_enable sqlite) \
+ $(use_enable berkdb db) \
+ $(use_enable ldap) \
+ $(use_enable pam) \
+ --enable-pipe \
+ --enable-anon \
+ --enable-fs \
+ $(use_enable test tests) \
+ $(usex berkdb "--with-extra-include-path=$(db_includedir)" "") \
+ $(use_with zlib)
+}
+
+src_prepare() {
+ # Fix some default directory locations
+ sed -i \
+ -e 's,@localstatedir@/@package@/pid/,/var/run/@package@/,g' \
+ -e 's,@localstatedir@/@package@/run/pbx,/var/run/@package@/pbx,g' \
+ -e 's,@localstatedir@/@package@/log/,/var/log/@package@/,g' \
+ -e 's,@localstatedir@/lib/jabberd2/fs,@localstatedir@/@package@/fs,g' \
+ -e 's,@localstatedir@,/var/spool,g' \
+ -e 's,@package@,jabber,g' \
+ etc/{sm,router,c2s,s2s}.xml.dist.in || die
+
+ # If the package wasn't merged with sqlite then default to use berkdb
+ use sqlite ||
+ sed -i \
+ -e 's,<\(module\|driver\)>sqlite<\/\1>,<\1>db</\1>,g' \
+ etc/{c2s,sm}.xml.dist.in || die
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+
+ keepdir /var/spool/jabber/{fs,db}
+ fowners jabber:jabber /usr/bin/{jabberd,router,sm,c2s,s2s} \
+ /var/spool/jabber/{fs,db}
+ fperms 770 /var/spool/jabber/{fs,db}
+ fperms 750 /usr/bin/{jabberd,router,sm,c2s,s2s}
+
+ newinitd "${FILESDIR}/${PN}-2.2.17.init" jabberd
+ newpamd "${FILESDIR}/${PN}-2.2.8.pamd" jabberd
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}-2.2.17.logrotate" jabberd
+
+ docompress -x /usr/share/doc/${PF}/tools
+ docinto tools
+ dodoc tools/db-setup{.mysql,.pgsql,.sqlite} \
+ tools/{migrate-jd14dir-2-sqlite.pl,pipe-auth.pl}
+}
+
+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
+ fi
+
+ if use sqlite || use mysql || use postgres; then
+ echo
+ einfo 'You will need to setup or update your database using the'
+ einfo "scripts in /usr/share/doc/${PF}/tools/"
+ einfo 'e.g. bzcat db-setup.sqlite.bz2 | sqlite3 /var/spool/jabber/db/sqlite.db'
+ echo
+ fi
+
+}
diff --git a/net-im/jabberd2/metadata.xml b/net-im/jabberd2/metadata.xml
index 62e1da63b560..4c2f7c659b2f 100644
--- a/net-im/jabberd2/metadata.xml
+++ b/net-im/jabberd2/metadata.xml
@@ -3,8 +3,8 @@
<pkgmetadata>
<herd>net-im</herd>
<use>
- <flag name='memdebug'>Enable nad and pool debug. Requires USE="debug" to
- be set.
+ <flag name='memdebug'>Enable nad and pool debug.
+ Requires USE="debug" to be set.
</flag>
</use>
</pkgmetadata>