Merge branch '35-jabberd2-2-4-0' into 'master'

net-im/jabberd2:

added ebuild for jabberd2-2.4.0, as this version is not yet in the official tree.

Package-Manager: portage-2.2.28
Closes #35

See merge request !99
This commit is contained in:
Manuel Friedli 2016-08-07 22:55:30 +02:00
commit 2672e68da3
3 changed files with 189 additions and 1 deletions

View file

@ -1,3 +1,9 @@
*jabberd2-2.4.0 (07 Aug 2016)
07 Aug 2016; Manuel Friedli <manuel@fritteli.ch> +jabberd2-2.4.0.ebuild:
net-im/jabberd2: added ebuild for jabberd2-2.4.0, as this version is not yet
in the official tree.
*jabberd2-2.3.6 (06 Aug 2016)
06 Aug 2016; Manuel Friedli <manuel@fritteli.ch> +files/jabberd2-2.3.1.pamd,

View file

@ -4,6 +4,8 @@ AUX jabberd2-2.3.2.logrotate 197 SHA256 bca314e2555e113ee0916d33060c27332381cc3c
AUX jabberd2-2.3.4-optimization.patch 627 SHA256 8a10c307846425d0ca8f987c8f46c1559f57d7fb4a448744a93637ece01577bd SHA512 2f38d9eb597f7bea21082a56eee1e28474cc66b56d5dd7de45853c98a5cdecbe7d1e5ff951b6b1395f7c27a9a2ec13c4552031b711d882fbd946338116b7d83e WHIRLPOOL aa67b5f0cbb50a81b789ced5efd0f22a2b199a4d51d1c242cde17f8317b1c2fe00d54ba0b73654bc0f7dd4fd027df83646afe5401a7f665d174faae163151be5
AUX jabberd2-2.3.6-configure.patch 593 SHA256 39d3cdbcf57ff2247c4ca21cc130f56173a7f0db9f37f71048cae4cd9a043e15 SHA512 15e12903af39209e94b2ee42b802f93d5dc9f5d5f6dc646b65402d4445e046df02fe8150be675024a2b7f4d8f21f2cd2af1976a28c81d429be2e91c3845a327a WHIRLPOOL ef49fd6dd2158804bbd7bb93994089d2f301878ba7dcfa2d93ad77e6c4cbaa52c26e61f6191013b911ca8852f6e3d64faea2fea248dc5ddbcf5f0808cd759faf
DIST jabberd-2.3.6.tar.xz 1503864 SHA256 33cbf58135f856f5e6e6a7769623fedfda21f0c5f88b3b687a22e04ad915c051 SHA512 c5efa443865028874e1c1f15937064edef4c1699afb14b55963e3cd86930a67dffed7830ab1ae77522cbf797ef9ab89d044ccb28ac65904ffa7e79dee155e8aa WHIRLPOOL 43f6c02d67c792fa1391cc87e7f4d60b6fe7089d8dc7796d54e0e25f1815ad29921eeb97aeb554b015261b7e5f83cd33d076abb61e60ff9fe9441971cb85bdcb
DIST jabberd-2.4.0.tar.xz 1507452 SHA256 1101571f4a94d7ec5a82839e9e2abee51f3983e3b9c416f1b7f2f738ebebdee1 SHA512 eb621d2d76806361f54db49d1d3b2be0e0b5559f8ec64bc8ce8cd10f1455e8f4b98395cf790f969cb8ef63f2fa83f5974c5b70aaa82bbe670e1aa15a3d5a0a0b WHIRLPOOL f6e64febfc72e0d18f2063027cc764361601ab379e41bdb27a7d01f35d472a35632203f0905de8d61ef5f633f53dfa950310c20e9d7d8b69b922ed641793721c
EBUILD jabberd2-2.3.6.ebuild 5270 SHA256 59d85fa7b59a21011e080f475ccb69bfdb0aed4b86120e64e746c03e870674db SHA512 091ed958d3e0b0e663965ae7200054f8dc3fcf8665b9232edf04c34b42081f81f80d3a13f18965d74da9ed578a96439f69468518f298fd5c555de8b5522c5274 WHIRLPOOL ddc22f6f4019a5759f8182e3524fdd14bf36083a0537bc7b3bee576845c0ccf92c424e85a806cdc85a7e3f5b5a01d9abd2e5cd26c1744044e231bf44797a8513
MISC ChangeLog 350 SHA256 c54b729fa89c6fc316d6e82cd9c8caf39997300048a4a220faf41d314495b5fc SHA512 db9aec023709ad964f7ea1f739719ecc7ea61242a7bf5e311f1827814d85460fbcc3c92b4801e97d5ca3ada26182801a96d55310ea2a2d3e83a47b80a07aab4c WHIRLPOOL ae03b9ac67ed223b7b5315972eee4663f7d1918578075905f89a384a1325b4f46297cc3a0b8b902e23a539b37332f3c69ff23bebccb787b143d43ef207af6c57
EBUILD jabberd2-2.4.0.ebuild 5228 SHA256 80927a0c19c7a97a3f81ba28141c90f5c0c110f661024da9c38b3244879ef865 SHA512 65ae3de033e178598a3401b585c7ba28b2e94ae55e86dc18d526f59f6800128c0ac608ff7723de85c66683a8db37a56ec74b0b2b9046038a96e6657e29462e86 WHIRLPOOL 004d08df2f8b3fdd28bc73628e1a17bbb914bdd8632285f97595b6cc6e2039e72fb8b303f1f88150e3300c6dc5b9cb9bd665706d9554c42c1ed79d764f93a5fa
MISC ChangeLog 561 SHA256 95bb8ede7a41f3fef819599d60791d20af556ffe359bddc402896a0559525151 SHA512 50503af9d2f237d1d0d8d7cbd9aaca46feb6437f8e9a578195753b417c70f75db09c62e9304cab3fe822aa641bb2fba8c8ac9c48ffc415de5b0a5bac177b9584 WHIRLPOOL 813520ed329a67e6f3829414ceb90960d24ecb6839215c41023e15401bcbc872da8a04c33653317bf5ea678993c3e813a42dca1d4fb76c5627ce8e46d3b0f60d
MISC metadata.xml 579 SHA256 70e01bf1f9b621d35d36cfd78ed7f99a214eadeca0dd5031adc86aff077b2023 SHA512 ebaf4fd332d1dede7f0e68e135e14c9e464b04ac22a11af32a43af91af2ec17836165d810e6fe4cab876ea33f120ef00fc9392da2c80b90813e7857c946abcda WHIRLPOOL 84043f101020e6bea68efe9be27c5d08fff6d0f06116c0643ce27b36a146068dadbb235aebe7a2d377dd9c269ece471ab4080fc1589263b315c04941c140dcf6

View file

@ -0,0 +1,180 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
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
virtual/pkgconfig
test? ( dev-libs/check )"
DOCS=( AUTHORS README )
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
epatch "${FILESDIR}"/${PN}-2.3.6-configure.patch
eautoreconf
}
src_configure() {
# --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 websocket) \
$(use_enable experimental) \
$(use_enable test tests) \
$(usex berkdb "--with-extra-include-path=$(db_includedir)" "") \
$(use_with zlib)
}
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.3.2.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!'
}