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:
Manuel Friedli 2016-08-07 01:44:50 +02:00
parent c66496e31f
commit 0f791f078a
8 changed files with 344 additions and 0 deletions

View 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

View 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
}

View 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
}

View 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]),