summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2008-05-22 11:43:11 +0000
committerCaleb Tennis <caleb@gentoo.org>2008-05-22 11:43:11 +0000
commitb60edcf61475a759d00e2fc407fba61e338ca1ae (patch)
treec39287ac202509b7e4f3b7a115156e92ca7115ac /net-im
parentStable on alpha, bug #222737 (diff)
downloadgentoo-2-b60edcf61475a759d00e2fc407fba61e338ca1ae.tar.gz
gentoo-2-b60edcf61475a759d00e2fc407fba61e338ca1ae.tar.bz2
gentoo-2-b60edcf61475a759d00e2fc407fba61e338ca1ae.zip
version bump
(Portage version: 2.1.5_rc10)
Diffstat (limited to 'net-im')
-rw-r--r--net-im/ejabberd/ChangeLog8
-rw-r--r--net-im/ejabberd/ejabberd-2.0.1.ebuild152
-rw-r--r--net-im/ejabberd/files/ejabberd-2.0.0.initd10
-rw-r--r--net-im/ejabberd/files/ejabberd-2.0.1.confd23
-rw-r--r--net-im/ejabberd/files/ejabberd-2.0.1.initd53
5 files changed, 239 insertions, 7 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog
index 95560b83c82a..639ac811540e 100644
--- a/net-im/ejabberd/ChangeLog
+++ b/net-im/ejabberd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-im/ejabberd
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.35 2008/04/13 22:02:40 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.36 2008/05/22 11:43:10 caleb Exp $
+
+*ejabberd-2.0.1 (22 May 2008)
+
+ 22 May 2008; Caleb Tennis <caleb@gentoo.org> files/ejabberd-2.0.0.initd,
+ +ejabberd-2.0.1.ebuild:
+ version bump
13 Apr 2008; Caleb Tennis <caleb@gentoo.org> files/self-cert-v2.sh,
ejabberd-2.0.0-r1.ebuild:
diff --git a/net-im/ejabberd/ejabberd-2.0.1.ebuild b/net-im/ejabberd/ejabberd-2.0.1.ebuild
new file mode 100644
index 000000000000..1df3bbfe2c05
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-2.0.1.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.1.ebuild,v 1.1 2008/05/22 11:43:10 caleb Exp $
+
+inherit eutils multilib
+
+JABBER_ETC="/etc/jabber"
+JABBER_RUN="/var/run/jabber"
+JABBER_SPOOL="/var/spool/jabber"
+JABBER_LOG="/var/log/jabber"
+
+MY_PV=${PV}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="The Erlang Jabber Daemon"
+HOMEPAGE="http://www.ejabberd.im/"
+SRC_URI="http://process-one.net/en/projects/${PN}/download/${PV/_/-}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~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-11.2.5
+ 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}/${MY_P}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Bug #171427
+ epatch "${FILESDIR}/2.0.0-missing-declaration.patch"
+ # Bug #215853
+ #epatch "${FILESDIR}/${MY_PV}-erlang12-s2s-in.patch"
+ # patch for mod_proxy65 using erlang12
+ # http://support.process-one.net/browse/EJAB-542
+ #epatch "${FILESDIR}/${MY_PV}-ejab-542-mod_proxy65.patch"
+
+ # get rid of the prefix
+ sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
+ || die "cannot sed Makefile.in"
+ # we want ejabberdctl in /usr/sbin not /sbin !!!
+ sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
+ || die "cannot sed Makefile.in"
+}
+
+src_compile() {
+ econf --prefix=/ \
+ $(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"
+
+ # remove the default ejabberdctl as we use our own
+ rm "${D}/usr/sbin/ejabberdctl"
+
+ insinto ${JABBER_ETC}
+
+ 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}"
+
+ if useq ssl ; then
+ doins "${FILESDIR}/ssl.cnf"
+ newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
+ fi
+
+ cd "${WORKDIR}/${MY_P}/doc"
+ dodoc "release_notes_${PV}.txt"
+ dohtml *.{html,png}
+
+ # set up /usr/sbin/ejabberd wrapper
+ cat "${FILESDIR}/ejabberd-wrapper-2.0.0.template" \
+ | sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
+ > "${T}/ejabberd"
+ exeinto /usr/sbin
+ doexe "${T}/ejabberd"
+
+ # set up /usr/sbin/ejabberdctl wrapper
+ cat "${FILESDIR}/ejabberdctl-wrapper-2.0.0.template" \
+ | sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
+ > "${T}/ejabberdctl"
+ doexe "${T}/ejabberdctl"
+
+ newinitd "${FILESDIR}/${MY_P}.initd" ${PN}
+ newconfd "${FILESDIR}/${MY_P}.confd" ${PN}
+
+ # fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
+ # that would be generated by /etc/jabber/self-cert.sh
+ sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
+ "${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
+
+ # if mod_irc is not enabled, comment out the mod_irc in the default
+ # ejabberd.cfg
+ if ! use mod_irc; then
+ sed -i -e "s/{mod_irc,/%{mod_irc,/" \
+ "${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
+ fi
+}
+
+pkg_postinst() {
+ elog "For configuration instructions, please see"
+ elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
+ elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
+ 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
+ elog "===================================================================="
+ elog 'Quick Start Guide:'
+ elog '1) Add output of `hostname -s` to /etc/jabber/ejabberd.cfg line 89'
+ elog ' {hosts, ["localhost", "thehost"]}.'
+ elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 324'
+ elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
+ elog '3) Start the server'
+ elog ' # /etc/init.d/ejabberd start'
+ elog '4) Register the admin user'
+ elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
+ elog '5) Log in with your favourite jabber client or using the web admin'
+}
diff --git a/net-im/ejabberd/files/ejabberd-2.0.0.initd b/net-im/ejabberd/files/ejabberd-2.0.0.initd
index 1b351c464241..ed5a19ba0b7f 100644
--- a/net-im/ejabberd/files/ejabberd-2.0.0.initd
+++ b/net-im/ejabberd/files/ejabberd-2.0.0.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.0.initd,v 1.2 2008/04/13 12:27:10 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.0.initd,v 1.3 2008/05/22 11:43:11 caleb Exp $
opts="${opts} reload"
@@ -20,7 +20,7 @@ checkconfig() {
start() {
checkconfig || return 1
- ebegin "Starting eJabberd"
+ ebegin "Starting ejabberd"
# the process name of beam is different depending whether smp is used.
# set it explicitly so start-stop-daemon works
case "$HAVE_SMP" in
@@ -37,18 +37,16 @@ start() {
--name $BEAMNAME \
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
eend $?
- # For bug #190266
- chown jabber:jabber /var/run/jabber/.erlang.cookie
}
stop() {
- ebegin "Stopping eJabberd"
+ ebegin "Stopping ejabberd"
/usr/sbin/ejabberdctl stop
eend $?
}
reload() {
- ebegin "Reloading eJabberd"
+ ebegin "Reloading ejabberd"
/usr/sbin/ejabberdctl reopen-log
eend $?
}
diff --git a/net-im/ejabberd/files/ejabberd-2.0.1.confd b/net-im/ejabberd/files/ejabberd-2.0.1.confd
new file mode 100644
index 000000000000..792bf6894fbd
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.0.1.confd
@@ -0,0 +1,23 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.1.confd,v 1.1 2008/05/22 11:43:11 caleb Exp $
+
+# Name of your ejabberd node. Used by ejabberdctl to determine which
+# node to communicate with.
+EJABBERD_NODE="ejabberd@`hostname -s`"
+
+# Max number of open network connections. Default is 1024. Increasing
+# this will slightly increase memory usage.
+#ERL_MAX_PORTS=1024
+
+# Return memory to the system after using it, instead of keeping it
+# allocated for future use. Decreases the memory required by ejabberd,
+# but makes it run slower. Default is unset, set to any value to
+# activate.
+#ERL_FULLSWEEP_AFTER=0
+
+# set to 1, "true" or "yes" if you have a symmetric-multi-processor
+# default is non smp
+#HAVE_SMP=0
+
+
diff --git a/net-im/ejabberd/files/ejabberd-2.0.1.initd b/net-im/ejabberd/files/ejabberd-2.0.1.initd
new file mode 100644
index 000000000000..5f57318ce93e
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.0.1.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.1.initd,v 1.1 2008/05/22 11:43:11 caleb Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use dns
+ need net
+ provide jabber-server
+}
+
+checkconfig() {
+ if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
+ eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ejabberd"
+ # the process name of beam is different depending whether smp is used.
+ # set it explicitly so start-stop-daemon works
+ case "$HAVE_SMP" in
+ "1"|"true"|"yes")
+ BEAMNAME="beam.smp"
+ SMPOPT="enable"
+ ;;
+ *)
+ BEAMNAME="beam"
+ SMPOPT="disable"
+ ;;
+ esac
+ start-stop-daemon --start --quiet --chuid jabber:jabber \
+ --name $BEAMNAME \
+ --exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ejabberd"
+ /usr/sbin/ejabberdctl stop
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ejabberd"
+ /usr/sbin/ejabberdctl reopen-log
+ eend $?
+}
+