net-im/jabberd2:
added ebuild for version 2.3.6, which is missing in the official tree Package-Manager: portage-2.2.28
This commit is contained in:
parent
c66496e31f
commit
0f791f078a
8 changed files with 344 additions and 0 deletions
8
net-im/jabberd2/ChangeLog
Normal file
8
net-im/jabberd2/ChangeLog
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
*jabberd2-2.3.6 (06 Aug 2016)
|
||||||
|
|
||||||
|
06 Aug 2016; Manuel Friedli <manuel@fritteli.ch> +files/jabberd2-2.3.1.pamd,
|
||||||
|
+files/jabberd2-2.3.2.init, +files/jabberd2-2.3.2.logrotate,
|
||||||
|
+files/jabberd2-2.3.4-optimization.patch, +jabberd2-2.3.6.ebuild,
|
||||||
|
+metadata.xml:
|
||||||
|
net-im/jabberd2: added ebuild for version 2.3.6, which is missing in the
|
||||||
|
official tree
|
8
net-im/jabberd2/Manifest
Normal file
8
net-im/jabberd2/Manifest
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
AUX jabberd2-2.3.1.pamd 158 SHA256 eba4b5cc68b3dd327cfa1afdadbe5adf6d9383f4c79c7661169a4339e40b9a7b SHA512 a52bec9577f028f1141002d0ffaaf11615699a67a7b3677774d7e8aa6595c8291cb6ebcdc0f874e54f700e3b437ae05e05b8d7c8c717dee15cb7d908a954b979 WHIRLPOOL 2289538542300efe78a261285359c6e5ad9151cc01123e3c5579cc72393ce94308d713e38d73bc418c5bc9d7f7a200469568b7b3187b576b3efa8efa19dda919
|
||||||
|
AUX jabberd2-2.3.2.init 1897 SHA256 a04c000fb56506abadad9df488368c09d34743414336a37d2596b640381aeff6 SHA512 eb91268d9edcfcd3a5610bdd4b9b9abe93f1092bb2bc4a76f47bad29ec1c2afbc74b029115c5c111d8c9a4fbab139366b050a9bee78a870b4e12cbed8511b39b WHIRLPOOL 8695d980c2f2af483815ff8fb2c7c7dbff6cdfb06e31a52c2bc027aa6ef8553fcc513205b2fc7ce5e1cacaffb1a56320303e1dd2853d907e7ba5b41ba7c797df
|
||||||
|
AUX jabberd2-2.3.2.logrotate 197 SHA256 bca314e2555e113ee0916d33060c27332381cc3cd633e00e3d092b1f7b0bd149 SHA512 1e3d74612dd08df2014af2ae0f0681e78c9902644dfbf37100369591803f2cf757d27967f7e9c99d3503cff8480ace7ce4b14303028d25866ebbd4ecf882d7c0 WHIRLPOOL c74129c39e571b811212e7d08d94c461c327f58510d9efa7cd1c96888524730024330c1c46accaafa7888b75d4af98302a91c35a4543928d0fb5e7eacebe6f2b
|
||||||
|
AUX jabberd2-2.3.4-optimization.patch 627 SHA256 8a10c307846425d0ca8f987c8f46c1559f57d7fb4a448744a93637ece01577bd SHA512 2f38d9eb597f7bea21082a56eee1e28474cc66b56d5dd7de45853c98a5cdecbe7d1e5ff951b6b1395f7c27a9a2ec13c4552031b711d882fbd946338116b7d83e WHIRLPOOL aa67b5f0cbb50a81b789ced5efd0f22a2b199a4d51d1c242cde17f8317b1c2fe00d54ba0b73654bc0f7dd4fd027df83646afe5401a7f665d174faae163151be5
|
||||||
|
DIST jabberd-2.3.6.tar.xz 1503864 SHA256 33cbf58135f856f5e6e6a7769623fedfda21f0c5f88b3b687a22e04ad915c051 SHA512 c5efa443865028874e1c1f15937064edef4c1699afb14b55963e3cd86930a67dffed7830ab1ae77522cbf797ef9ab89d044ccb28ac65904ffa7e79dee155e8aa WHIRLPOOL 43f6c02d67c792fa1391cc87e7f4d60b6fe7089d8dc7796d54e0e25f1815ad29921eeb97aeb554b015261b7e5f83cd33d076abb61e60ff9fe9441971cb85bdcb
|
||||||
|
EBUILD jabberd2-2.3.6.ebuild 5231 SHA256 cbcc181f1a02b171e48279a8b985f72d70e079a37112bed3310194d477ceba91 SHA512 146a1b906cfd1a65e19aa955bd9332d84182fa7c8c78bbffa76a8d8d909c87a9c53ff1d047f3724386ab605957aef7f10a827bdeb47f05a61b544aacea6b29d3 WHIRLPOOL 53b4d8b5d3d4a2f65ebda7d77749ef70e3be3b2ea58c35a342cb0dbb32394b2169ae6c9023cc8cad718fae43a20a593903afa93a66bd3ee7d4d868f5bccc91c4
|
||||||
|
MISC ChangeLog 350 SHA256 c54b729fa89c6fc316d6e82cd9c8caf39997300048a4a220faf41d314495b5fc SHA512 db9aec023709ad964f7ea1f739719ecc7ea61242a7bf5e311f1827814d85460fbcc3c92b4801e97d5ca3ada26182801a96d55310ea2a2d3e83a47b80a07aab4c WHIRLPOOL ae03b9ac67ed223b7b5315972eee4663f7d1918578075905f89a384a1325b4f46297cc3a0b8b902e23a539b37332f3c69ff23bebccb787b143d43ef207af6c57
|
||||||
|
MISC metadata.xml 579 SHA256 70e01bf1f9b621d35d36cfd78ed7f99a214eadeca0dd5031adc86aff077b2023 SHA512 ebaf4fd332d1dede7f0e68e135e14c9e464b04ac22a11af32a43af91af2ec17836165d810e6fe4cab876ea33f120ef00fc9392da2c80b90813e7857c946abcda WHIRLPOOL 84043f101020e6bea68efe9be27c5d08fff6d0f06116c0643ce27b36a146068dadbb235aebe7a2d377dd9c269ece471ab4080fc1589263b315c04941c140dcf6
|
6
net-im/jabberd2/files/jabberd2-2.3.1.pamd
Normal file
6
net-im/jabberd2/files/jabberd2-2.3.1.pamd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#%PAM-1.0
|
||||||
|
|
||||||
|
auth required pam_nologin.so
|
||||||
|
auth include system-auth
|
||||||
|
account include system-auth
|
||||||
|
session include system-auth
|
97
net-im/jabberd2/files/jabberd2-2.3.2.init
Normal file
97
net-im/jabberd2/files/jabberd2-2.3.2.init
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2016 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/${service}
|
||||||
|
|
||||||
|
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 /usr/bin/${service} \
|
||||||
|
--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
|
||||||
|
|
||||||
|
}
|
8
net-im/jabberd2/files/jabberd2-2.3.2.logrotate
Normal file
8
net-im/jabberd2/files/jabberd2-2.3.2.logrotate
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/var/log/jabber/c2s.log /var/log/jabber/s2s.log /var/log/jabber/sm.log /var/log/jabber/router.log {
|
||||||
|
su jabber jabber
|
||||||
|
sharedscripts
|
||||||
|
missingok
|
||||||
|
postrotate
|
||||||
|
/etc/init.d/jabberd reload
|
||||||
|
endscript
|
||||||
|
}
|
21
net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch
Normal file
21
net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
Re-allow the use of O3/Os, since it seems to have been an old compiler
|
||||||
|
bug.
|
||||||
|
|
||||||
|
See https://github.com/jabberd2/jabberd2/issues/34
|
||||||
|
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -23,13 +23,6 @@
|
||||||
|
LIBS="$LIBS $lt_cv_dlopen_libs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
-# check for optimisation level
|
||||||
|
-AC_MSG_CHECKING([CFLAGS optimization level])
|
||||||
|
-[if echo $CFLAGS | grep '.*-O[3s].*' >/dev/null 2>&1; then]
|
||||||
|
- AC_MSG_ERROR([maximum allowed optimization level is -O2])
|
||||||
|
-fi
|
||||||
|
-AC_MSG_RESULT([fine])
|
||||||
|
-
|
||||||
|
# extra paths
|
||||||
|
AC_ARG_WITH([extra_include_path], AC_HELP_STRING([--with-extra-include-path],
|
||||||
|
[use additional include paths]),
|
180
net-im/jabberd2/jabberd2-2.3.6.ebuild
Normal file
180
net-im/jabberd2/jabberd2-2.3.6.ebuild
Normal 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.4-optimization.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!'
|
||||||
|
}
|
16
net-im/jabberd2/metadata.xml
Normal file
16
net-im/jabberd2/metadata.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer>
|
||||||
|
<email>manuel@fritteli.ch</email>
|
||||||
|
<name>Manuel Friedli</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="experimental">Enable experimental features such as TLS Everywhere.</flag>
|
||||||
|
<flag name="memdebug">Enable nad and pool debug. Requires USE="debug" to be set.</flag>
|
||||||
|
<flag name="websocket">Enable WebSocket support on C2S port.</flag>
|
||||||
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">jabberd2/jabberd2</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
Loading…
Reference in a new issue