summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-02-07 11:41:46 +0100
committerLars Wendler <polynomial-c@gentoo.org>2017-02-07 11:42:02 +0100
commitc3f702918d97bbf6692f1fe07caa2969497b6d6e (patch)
treee2b214bd58ed7379715ee7f801a3fa30e3311e01 /net-im/jabberd2
parentnet-libs/libgsasl: Bumped to EAPI-6. (diff)
downloadgentoo-c3f702918d97bbf6692f1fe07caa2969497b6d6e.tar.gz
gentoo-c3f702918d97bbf6692f1fe07caa2969497b6d6e.tar.bz2
gentoo-c3f702918d97bbf6692f1fe07caa2969497b6d6e.zip
net-im/jabberd2: Bump to version 2.5.0
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-im/jabberd2')
-rw-r--r--net-im/jabberd2/Manifest1
-rw-r--r--net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch4
-rw-r--r--net-im/jabberd2/files/jabberd2-2.5.0.init91
-rw-r--r--net-im/jabberd2/jabberd2-2.5.0.ebuild186
4 files changed, 280 insertions, 2 deletions
diff --git a/net-im/jabberd2/Manifest b/net-im/jabberd2/Manifest
index 6d37dbc52769..030fdf124ddc 100644
--- a/net-im/jabberd2/Manifest
+++ b/net-im/jabberd2/Manifest
@@ -1,2 +1,3 @@
DIST jabberd-2.3.3.tar.xz 1457340 SHA256 c6c2f34d0811e90c5c791143018bb5b07ecbe2ea5d8cc10140235d25815cb030 SHA512 c3c8d6829c3bc61555280d90edc1bef0228e4cec2684ba283373075883ef64bfa5e9118dad96d7a1193bb2afb6b2e7c78e24267e6feb6e7b191138bf8c79a7da WHIRLPOOL 0c590d79905ff95d2e18362065e0ba4e2341fdc95a61d3e157993d7d16976480b81f2f4b0479516538b1c5c0c9b496b446383da89c2e17539f8f9cb59db62463
DIST jabberd-2.3.4.tar.xz 1482736 SHA256 9a17fae72460dd4454814edb48a7a1af7071cf331dabc2b0b6029661a36bb671 SHA512 593c1a80de52447fa18e448627bdbf85605e8a406129808cd2081576c26d65df3315c5fc91b37d5e832e1a89b4083d873b2db1e65d6ad76fa5b9b4f125786b7f WHIRLPOOL 67a0e96a872a08975d981e1697fab5cf154b4cbea4c698d41d250c1314bc7303a3c15e871fc8b3c4f3769acd91773734ef61b880900132e435d17f9bde587b08
+DIST jabberd-2.5.0.tar.xz 1507916 SHA256 9ec4a8be6c01fe68cccee347e08aab34399205ecfe3557985debc368b86aeb8a SHA512 e1298f42a199bb31cea324f239368327a259eaaa3e4624eac5b6aca983f32467c47248c57e4621fd7f7eb64a3b86d760f5e9a57b4307174d820d20e77ae3229e WHIRLPOOL 4479955ba6f2511fda98660f51d1355532bf8f26c23a74b8aa892810d45c3ff3cdfbb7398d501c44048082e2d4dc50eb88dc135595ef0b35ba1c06c7dbe91d57
diff --git a/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch
index 480816248c81..d320b9d1f349 100644
--- a/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch
+++ b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch
@@ -3,8 +3,8 @@ bug.
See https://github.com/jabberd2/jabberd2/issues/34
---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -23,13 +23,6 @@
LIBS="$LIBS $lt_cv_dlopen_libs"
fi
diff --git a/net-im/jabberd2/files/jabberd2-2.5.0.init b/net-im/jabberd2/files/jabberd2-2.5.0.init
new file mode 100644
index 000000000000..c5e571029efc
--- /dev/null
+++ b/net-im/jabberd2/files/jabberd2-2.5.0.init
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="reload"
+
+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 executable cfgfile pidfile
+ 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/$(echo ${service} | cut -d '.' -f 1)"
+
+ if [ ! -f "${executable}" ]; then
+ eerror "Can't find executable: ${executable}"
+ stopJabberServices
+ return 1
+ fi
+
+ ebegin "Starting ${service} (${cfgfile})"
+ pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')"
+ start-stop-daemon \
+ --background \
+ --start \
+ --user jabber:jabber \
+ --exec ${executable} \
+ --pid ${pidfile} \
+ -- -c ${cfgfile}
+ eend $?
+
+ done
+ eoutdent
+}
+
+reload() {
+ eindent
+ for pidfile in /var/run/jabber/*.pid; do
+ if [ -f "${pidfile}" ]; then
+ service=$(basename ${pidfile} .pid)
+ ebegin "Reloading ${service}"
+ kill -HUP $(cat ${pidfile})
+ eend $?
+ fi
+ done
+ eoutdent
+}
+
+stop() {
+ einfo "Stopping Jabber Server"
+ stopJabberServices
+}
diff --git a/net-im/jabberd2/jabberd2-2.5.0.ebuild b/net-im/jabberd2/jabberd2-2.5.0.ebuild
new file mode 100644
index 000000000000..0355816367c6
--- /dev/null
+++ b/net-im/jabberd2/jabberd2-2.5.0.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools db-use eutils flag-o-matic pam
+
+DESCRIPTION="Open Source Jabber Server"
+HOMEPAGE="http://jabberd2.org"
+SRC_URI="https://github.com/jabberd2/jabberd2/releases/download/jabberd-${PV}/jabberd-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="berkdb debug experimental ldap libressl memdebug mysql pam postgres sqlite ssl test websocket 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/libmysqlclient:=
+ virtual/mysql:=
+ )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql:= )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1:0[-bindist] )
+ libressl? ( dev-libs/libressl:= )
+ )
+ sqlite? ( dev-db/sqlite:3 )
+ websocket? ( net-libs/http-parser:= )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ >=net-im/jabber-base-0.01"
+DEPEND="${DEPEND}
+ app-arch/xz-utils
+ sys-devel/autoconf-archive
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+
+DOCS=( AUTHORS README )
+
+#PATCHES=(
+#)
+
+S="${WORKDIR}/jabberd-${PV}"
+
+pkg_pretend() {
+ if is-flagq '-O[3s]' ; then
+ ewarn "O3/Os compiler flags have been known to cause problems"
+ ewarn "with old gcc version. Be aware that this could break"
+ ewarn "port binding. Make sure to test this."
+ ewarn "See https://github.com/jabberd2/jabberd2/issues/34"
+ fi
+}
+
+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 "fixing default directory locations failed!"
+
+ # 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 "setting berkdb as default failed!"
+
+ # avoid file collision with x11-misc/screen-message wrt #453994
+ sed -i \
+ -e 's/@jabberd_router_bin@/jabberd2-router/' \
+ -e 's/@jabberd_c2s_bin@/jabberd2-c2s/' \
+ -e 's/@jabberd_s2s_bin@/jabberd2-s2s/' \
+ -e 's/@jabberd_sm_bin@/jabberd2-sm/' \
+ etc/jabberd*.in || die "fixing file collisions failed!"
+
+ # rename pid files wrt #241472
+ sed -i \
+ -e '/pidfile/s/${id}\.pid/jabberd2-c2s\.pid/' \
+ etc/c2s.xml.dist.in || die
+ sed -i \
+ -e '/pidfile/s/${id}\.pid/jabberd2-router\.pid/' \
+ etc/router.xml.dist.in || die
+ sed -i \
+ -e '/pidfile/s/${id}\.pid/jabberd2-s2s\.pid/' \
+ etc/s2s.xml.dist.in || die
+ sed -i \
+ -e '/pidfile/s/${id}\.pid/jabberd2-sm\.pid/' \
+ etc/sm.xml.dist.in || die
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # --enable-pool-debug is currently broken
+ myeconfargs=(
+ --sysconfdir=/etc/jabber
+ --enable-pipe
+ --enable-anon
+ --enable-fs
+ $(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)
+ $(use_enable websocket)
+ $(use_enable experimental)
+ $(use_enable test tests)
+ $(usex berkdb "--with-extra-include-path=$(db_includedir)" "")
+ $(use_with zlib)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ local i
+
+ 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}
+
+ # avoid file collision with x11-misc/screen-message wrt #453994
+ for i in router sm c2s s2s ; do
+ einfo "renaming /usr/bin/${i} to /usr/bin/jabberd2-${i}"
+ mv "${ED%/}"/usr/bin/${i} "${ED%/}"/usr/bin/jabberd2-${i} || die
+ done
+
+ newinitd "${FILESDIR}/${PN}-2.5.0.init" jabberd
+ newpamd "${FILESDIR}/${PN}-2.3.1.pamd" jabberd
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}-2.3.2.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}
+
+ # remove useless upstart files wrt #498900
+ rm -rf "${ED%/}"/usr/etc
+}
+
+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/"
+ echo
+ fi
+
+ ewarn 'If you are upgrading from <=jabberd2-2.2.17 then you might have'
+ ewarn 'to update /etc/jabber/jabberd.cfg via etc-update because'
+ ewarn 'the binaries have been renamed to avoid file collisions!'
+}