summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2007-09-14 11:38:29 +0000
committerTony Vroon <chainsaw@gentoo.org>2007-09-14 11:38:29 +0000
commit68b17957c8bc3afb447ccf859fb4eca69e9d282c (patch)
treecbab8857fe0e384bb2bdd29516ff2fcbe1babd95
parentApply install-sh patches (diff)
downloadgentoo-2-68b17957c8bc3afb447ccf859fb4eca69e9d282c.tar.gz
gentoo-2-68b17957c8bc3afb447ccf859fb4eca69e9d282c.tar.bz2
gentoo-2-68b17957c8bc3afb447ccf859fb4eca69e9d282c.zip
Version bump, closes bugs #188679, #192012 and #190266.
(Portage version: 2.1.3.9)
-rw-r--r--net-im/ejabberd/ChangeLog8
-rw-r--r--net-im/ejabberd/ejabberd-1.1.4.ebuild134
-rw-r--r--net-im/ejabberd/files/1.1.4-missing-declaration.patch12
-rw-r--r--net-im/ejabberd/files/digest-ejabberd-1.1.43
-rw-r--r--net-im/ejabberd/files/ejabberd-1.1.4.initd62
5 files changed, 218 insertions, 1 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog
index f5e044110686..92d73610c4e6 100644
--- a/net-im/ejabberd/ChangeLog
+++ b/net-im/ejabberd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-im/ejabberd
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.23 2007/09/01 07:04:02 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.24 2007/09/14 11:38:28 chainsaw Exp $
+
+*ejabberd-1.1.4 (14 Sep 2007)
+
+ 14 Sep 2007; Tony Vroon <chainsaw@gentoo.org> +files/ejabberd-1.1.4.initd,
+ +files/1.1.4-missing-declaration.patch, +ejabberd-1.1.4.ebuild:
+ Version bump, closes bugs #188679, #192012 and #190266.
01 Sep 2007; Christian Faulhammer <opfer@gentoo.org>
ejabberd-1.1.3-r2.ebuild:
diff --git a/net-im/ejabberd/ejabberd-1.1.4.ebuild b/net-im/ejabberd/ejabberd-1.1.4.ebuild
new file mode 100644
index 000000000000..eb7025f67ca4
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-1.1.4.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-1.1.4.ebuild,v 1.1 2007/09/14 11:38:28 chainsaw Exp $
+
+inherit eutils multilib
+
+JABBER_ETC="/etc/jabber"
+JABBER_RUN="/var/run/jabber"
+JABBER_SPOOL="/var/spool/jabber"
+JABBER_LOG="/var/log/jabber"
+
+DESCRIPTION="The Erlang Jabber Daemon"
+HOMEPAGE="http://ejabberd.jabber.ru/"
+SRC_URI="http://process-one.net/en/projects/${PN}/download/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc ssl web zlib"
+
+DEPEND=">=net-im/jabber-base-0.01
+ >=dev-libs/expat-1.95
+ >=dev-lang/erlang-10.2.0
+ odbc? ( dev-db/unixODBC )
+ ldap? ( =net-nds/openldap-2* )
+ ssl? ( >=dev-libs/openssl-0.9.8e )
+ zlib? ( sys-libs/zlib )"
+
+PROVIDE="virtual/jabber-server"
+S=${WORKDIR}/${P}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Bug #171427
+ epatch "${FILESDIR}/${PV}-missing-declaration.patch"
+}
+
+src_compile() {
+ econf \
+ $(use_enable mod_irc) \
+ $(use_enable ldap eldap) \
+ $(use_enable mod_muc) \
+ $(use_enable mod_pubsub) \
+ $(use_enable ssl tls) \
+ $(use_enable web) \
+ $(use_enable odbc) \
+ $(use_enable zlib ejabberd_zlib) \
+ || die "econf failed"
+
+ if useq debug; then
+ emake ejabberd_debug=true || die "compiling ejabberd core failed"
+ else
+ emake || die "compiling ejabberd core failed"
+ fi
+}
+
+src_install() {
+ make \
+ DESTDIR="${D}" \
+ EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
+ ETCDIR="${D}${JABBER_ETC}" \
+ LOGDIR="${D}${JABBER_LOG}" \
+ install \
+ || die "install failed"
+
+ chown -R jabber:jabber "${D}${JABBER_ETC}"
+ chown -R jabber:jabber "${D}${JABBER_LOG}"
+ chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
+
+ insinto /usr/share/doc/${PF}
+ dohtml doc/*.{html,png}
+
+ #
+ # Create /usr/bin/ejabberd
+ #
+ cat <<EOF > "${T}/ejabberd"
+#!/bin/bash
+
+erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
+ ${pa} \\
+ -sname ejabberd \\
+ -s ejabberd \\
+ -ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\
+ log_path \"${JABBER_LOG}/ejabberd.log\" \\
+ -kernel inetrc \"${JABBER_ETC}/inetrc\" \\
+ -sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\
+ -mnesia dir \"${JABBER_SPOOL}\" \\
+ \$@
+EOF
+
+ #
+ # Create /usr/bin/ejabberdctl
+ #
+ cat <<EOF > "${T}/ejabberdctl"
+#!/bin/sh
+
+exec env HOME=${JABBER_RUN} \\
+ erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
+ ${pa} \\
+ -noinput \\
+ -sname ejabberdctl \\
+ -s ejabberd_ctl \\
+ -extra \$@
+EOF
+
+ dobin "${T}/ejabberdctl"
+ dobin "${T}/ejabberd"
+
+ newinitd "${FILESDIR}/${P}.initd" ${PN}
+ newconfd "${FILESDIR}/ejabberd-1.1.3.confd" ${PN}
+
+ insinto ${JABBER_ETC}
+ doins "${FILESDIR}/inetrc"
+ if useq ssl ; then
+ doins "${FILESDIR}/ssl.cnf"
+ newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
+ fi
+}
+
+pkg_postinst() {
+ elog "For configuration instructions, please see /usr/share/doc/${PF}/html/guide.html"
+ elog "or the online version at http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
+ echo
+ if useq ssl ; then
+ if [ ! -e /etc/jabber/ssl.pem ]; then
+ elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
+ elog "Ejabberd may refuse to start without an SSL certificate"
+ fi
+ fi
+ if ! useq web ; then
+ elog "The web USE flag is off, this has disabled the web admin interface."
+ fi
+}
diff --git a/net-im/ejabberd/files/1.1.4-missing-declaration.patch b/net-im/ejabberd/files/1.1.4-missing-declaration.patch
new file mode 100644
index 000000000000..72c56cbcef97
--- /dev/null
+++ b/net-im/ejabberd/files/1.1.4-missing-declaration.patch
@@ -0,0 +1,12 @@
+diff -uNr ejabberd-1.1.4.ORIG/src/expat_erl.c ejabberd-1.1.4/src/expat_erl.c
+--- ejabberd-1.1.4.ORIG/src/expat_erl.c 2007-09-14 12:07:56.000000000 +0100
++++ ejabberd-1.1.4/src/expat_erl.c 2007-09-14 12:08:56.000000000 +0100
+@@ -14,6 +14,8 @@
+ * Workaround for EI encode_string bug
+ */
+
++int x_fix_buff(ei_x_buff* x, int szneeded);
++
+ #define put8(s,n) do { \
+ (s)[0] = (char)((n) & 0xff); \
+ (s) += 1; \
diff --git a/net-im/ejabberd/files/digest-ejabberd-1.1.4 b/net-im/ejabberd/files/digest-ejabberd-1.1.4
new file mode 100644
index 000000000000..630fbfdaaade
--- /dev/null
+++ b/net-im/ejabberd/files/digest-ejabberd-1.1.4
@@ -0,0 +1,3 @@
+MD5 65e9cd346f11a28afbacfe1d7be3a33b ejabberd-1.1.4.tar.gz 846059
+RMD160 4c72548129b0196ff0096bd85936e0750fc4d7be ejabberd-1.1.4.tar.gz 846059
+SHA256 dcd61b72c522eee77ab56227b16d75fd5741efe2b9b9a8a1d3ed7eefc2a7e4f6 ejabberd-1.1.4.tar.gz 846059
diff --git a/net-im/ejabberd/files/ejabberd-1.1.4.initd b/net-im/ejabberd/files/ejabberd-1.1.4.initd
new file mode 100644
index 000000000000..1f37df66a5c4
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-1.1.4.initd
@@ -0,0 +1,62 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-1.1.4.initd,v 1.1 2007/09/14 11:38:29 chainsaw Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use dns
+ need net
+ provide jabber-server
+}
+
+checkconfig() {
+ if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
+ eerror "You need an /etc/jabber/ejabberd.cfg file to run ejabberd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting eJabberd"
+ start-stop-daemon --start --quiet --chuid jabber:jabber \
+ --exec /usr/bin/env HOME=/var/run/jabber /usr/bin/ejabberd -- -noshell -detached
+ eend $?
+ # For bug #190266
+ chown jabber:jabber /var/run/jabber/.erlang.cookie
+}
+
+stop() {
+ ebegin "Stopping eJabberd"
+ if [ -z "$EJABBERD_NODE" ];
+ then
+ EJABBERD_NODE="ejabberd@`hostname -s`"
+ fi
+ /usr/bin/ejabberdctl $EJABBERD_NODE stop
+ eend $?
+}
+
+# Work around a bug in /sbin/runscript.sh - it won't run our custom
+# restart() unless it finds these two strings in the file.
+# svc_start svc_stop
+restart() {
+ ebegin "Restarting eJabberd"
+ if [ -z "$EJABBERD_NODE" ];
+ then
+ EJABBERD_NODE="ejabberd@`hostname -s`"
+ fi
+ /usr/bin/ejabberdctl $EJABBERD_NODE restart
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading eJabberd"
+ if [ -z "$EJABBERD_NODE" ];
+ then
+ EJABBERD_NODE="ejabberd@`hostname -s`"
+ fi
+ /usr/bin/ejabberdctl $EJABBERD_NODE reopen-log
+ eend $?
+}