diff options
author | Paul Labedan <plabedan@gmail.com> | 2015-03-20 20:16:15 +0100 |
---|---|---|
committer | Paul Labedan <plabedan@gmail.com> | 2015-03-22 19:12:50 +0100 |
commit | 4c81d1a2e1a0cd4c899e4766c8a55a557591648b (patch) | |
tree | d8b97592e67bbeb02ac04927bec40c004e4105c4 /net-im | |
parent | remove mesa: 10.5.x is now available in portage (diff) | |
download | plab-4c81d1a2e1a0cd4c899e4766c8a55a557591648b.tar.gz plab-4c81d1a2e1a0cd4c899e4766c8a55a557591648b.tar.bz2 plab-4c81d1a2e1a0cd4c899e4766c8a55a557591648b.zip |
add ejabberd 15.03
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/ejabberd/Manifest | 8 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-15.03.ebuild | 176 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-3.confd | 5 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-3.initd | 47 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.logrotate | 13 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.service | 15 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd.tmpfiles.conf | 1 | ||||
-rw-r--r-- | net-im/ejabberd/metadata.xml | 22 |
8 files changed, 287 insertions, 0 deletions
diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest new file mode 100644 index 0000000..09ef7d9 --- /dev/null +++ b/net-im/ejabberd/Manifest @@ -0,0 +1,8 @@ +AUX ejabberd-3.confd 161 SHA256 0296d3d281a321cd7380772c1d89a94e4a86f85b7f43bf9dc1af74935c2e6386 SHA512 07143642982df18461fdecd16daaad3baf6a06f8222d7a76757797c531be2803975ed60cc43aace24a624aa7c73bd8fdc6e023e739de492271b79e571f27c8fb WHIRLPOOL 657c44991244d58c10590093a7f58f654cb45cf7e22244b474459c63a449c17d0cf1d6f2d62008ddb34f0022f8fc9e31f22d2010cb3d1070a462bcb22a9a81fc +AUX ejabberd-3.initd 1025 SHA256 2810ca25fbe9d41a175b15c82d9ea1254fc4c934fd6ec02d9ee10bc34079e168 SHA512 5705074bd564568295d6d098394937ea44f5ea38ebc386fbcc3f8a239734acb77784500e8761e5fb3864fb56f7d136c9ef1f65603810d31b1f9a0ee4005d389a WHIRLPOOL 13718736e2ff08380c8a2df38099f11a0c5257188731fe9830e1ccdbe304b7c9984956ec7b1f9db11f677293a939604db79ac0870c1a74116d1eb70c1c373391 +AUX ejabberd.logrotate 203 SHA256 42f28222c6a5b7c691eb371085cccdef3fcba059a1e89f18744aa9bfc25e6294 SHA512 53cead768a76d18c01b229d0a1c0f38561c7a872fd751f1bb9b427c107f36a5536654a0047c5aef05507223f75c0e0f91e9a83b6c283fb9eceb8e31938de00d2 WHIRLPOOL ffbdfc1b22e855666aedbf816ec44439addcae21d82509399de046fa6a7c0182c1df756377a9d08d3b1f1d73e1e09ecd85da145357850d8a11d8ddb4b3b29d2a +AUX ejabberd.service 288 SHA256 541a67871c8b55e9a58ba8b1b30559d5ea2854809a78f58980fc7a436fa92071 SHA512 5f682b845650cafe00706daf3accf56e306829b9da08f7c17dc168296453806fa6b639e5820f1129b0f459e8550c3fc5aea4e2cf1ec2db8429a7b66e68a065fa WHIRLPOOL 5873a1d4c10bf13df71007e41a5201703a8f55d0bd0b9f29e83c526bfbecce943227aba8df7218da5f93f5f2f2371cf9bb15bc7d06268542543961a0505ab5b9 +AUX ejabberd.tmpfiles.conf 43 SHA256 2ee7fb4fb9c9c931ffa8c1dfa273e6658f3bbd37bb6ae25765b9e4f2a7459506 SHA512 8bdc297d5cb405e82c33627b36730992584d7f8b92d15c47933edd01ba6575983009c1f6607a21eee0280abdf7b51639d99d7836712a8d3629ec1e960b8a02c4 WHIRLPOOL f27e3a9bff1ab941c4a80fc5573d8541e40804f24b2f2e40e0f77c2ea2016e5c0b323e59674ed880df95037d0d82a956bc9ea984b5b371dd16e50858faa7e0d0 +DIST ejabberd-15.03.tgz 3262151 SHA256 b685cd615ecd9a4f42701541e84c2a28ae534bc608d292b78145d9c59ea17233 SHA512 a0158feea561960b1e52a78f0724d0129a21890d58027a3643f78f5092b257cc7501c152673332162f340844ad8823d10741ef3ebefc3b4a6f684c1707d069d5 WHIRLPOOL c702085b47ddeb458e3290e211721d1cd8b20e206737773c58861abe01581f2bc361201b58b7dae48ce28d7684a5afc103776aff180b3c193d1de91398902973 +EBUILD ejabberd-15.03.ebuild 6048 SHA256 896f9ea5c662043221dd5a62554cbd8db85e8840593a862837331a074e4076ce SHA512 2a5340428384a876307c68767622388f5f97c3616445952ad08e0fdcdc632c18b1764084089140b846c7641eba6ea9ac5a51826154fcd048e8155aeaf0420ed3 WHIRLPOOL 70a2ea1372b8f2561e11dc2e2f77cf2924e446983ca911b5946186380458f27a4cd7818428c623c9a6b83098d53fd903be98fd142dd8dc2381a5b22fbfc97aba +MISC metadata.xml 915 SHA256 9c1956a6be7e957bf41c3ac9b5b176a9edd963fc5c8055609461689e09e0cbc6 SHA512 7ce2467693ba5db6397e28fe71a5add944c005aadfe83d21ced82a830c26971a4e94b1273239e1c0a729f2bf8b2e46a603a65109b93d7f2695e764dddbb114b8 WHIRLPOOL 19ef3e6c81ccfe6aa11b8e796956a19cdc80e56645dea70b28e1a67db211b88f36893e196f243a839d40613c6ff8b421c73f0d72ffea925fe13dbdf484b59804 diff --git a/net-im/ejabberd/ejabberd-15.03.ebuild b/net-im/ejabberd/ejabberd-15.03.ebuild new file mode 100644 index 0000000..e360e1e --- /dev/null +++ b/net-im/ejabberd/ejabberd-15.03.ebuild @@ -0,0 +1,176 @@ +EAPI=5 + +inherit eutils multilib pam ssl-cert systemd + +DESCRIPTION="The Erlang Jabber Daemon" +HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/" +SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86" +EJABBERD_MODULES="mod_irc mod_muc mod_proxy65 mod_pubsub" +IUSE="captcha debug ldap odbc pam +web zlib ${EJABBERD_MODULES}" + +DEPEND=">=net-im/jabber-base-0.01 + >=dev-libs/expat-1.95 + >=dev-libs/libyaml-0.1.4 + >=dev-lang/erlang-15.2.3.1[ssl] + odbc? ( dev-db/unixODBC ) + ldap? ( =net-nds/openldap-2* ) + >=dev-libs/openssl-0.9.8e + captcha? ( media-gfx/imagemagick[truetype,png] ) + zlib? ( >=sys-libs/zlib-1.2.3 )" +RDEPEND="${DEPEND} + >=sys-apps/shadow-4.1.4.2-r3 + pam? ( virtual/pam )" + +S=${WORKDIR}/${P} + +# paths in net-im/jabber-base +JABBER_ETC="${EPREFIX}/etc/jabber" +JABBER_SPOOL="${EPREFIX}/var/spool/jabber" +JABBER_LOG="${EPREFIX}/var/log/jabber" +JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}" +# home folder for jabber user +JABBER_HOME="${EPREFIX}/var/lib/jabber" + +src_prepare() { + # don't install release notes (we'll do this manually) + sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die + # Set correct paths + sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \ + -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \ + -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \ + -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \ + -i Makefile.in || die + sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \ + -e "s|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \ + -e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \ + -e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \ + -i ejabberdctl.template || die + + # Set shell, so it'll work even in case jabber user have no shell + # This is gentoo specific I guess since other distributions may have + # ejabberd user with reall shell, while we share this user among different + # jabberd implementations. + sed '/^HOME/aSHELL=/bin/sh' -i ejabberdctl.template || die + sed '/^export HOME/aexport SHELL' -i ejabberdctl.template || die + + #sed -e "s:/share/doc/ejabberd/:${JABBER_DOC}:" -i web/ejabberd_web_admin.erl + + # fix up the ssl cert paths in ejabberd.cfg to use our cert + sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \ + -i ejabberd.yml.example || die "Failed sed ejabberd.yml.example (changing ssl patch)" + + # correct path to captcha script in default ejabberd.cfg + sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1/usr/'$(get_libdir)'/erlang/lib/'${P}'/priv/bin/captcha.sh"}|' \ + -i ejabberd.yml.example || die "Failed sed ejabberd.yml.example (changing captcha script)" + + # disable mod_irc in ejabberd.cfg + if ! use mod_irc; then + sed -e "s/mod_irc:/## mod_irc:/" \ + -i ejabberd.yml.example || die "Failed sed ejabberd.yml.example (disable mod_irc)" + fi +} + +src_configure() { + econf \ + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/" \ + $(use_enable mod_irc) \ + $(use_enable ldap eldap) \ + $(use_enable mod_muc) \ + $(use_enable mod_proxy65) \ + $(use_enable mod_pubsub) \ + $(use_enable web) \ + $(use_enable odbc) \ + $(use_enable zlib ejabberd_zlib) \ + $(use_enable pam) \ + --enable-user=jabber +} + +src_compile() { + emake $(use debug && echo debug=true ejabberd_debug=true) +} + +src_install() { + default + + # Pam helper module permissions + # http://www.process-one.net/docs/ejabberd/guide_en.html + if use pam; then + pamd_mimic_system xmpp auth account || die "Cannot create pam.d file" + fowners root:jabber "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam" + fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam" + fi + + newinitd "${FILESDIR}"/${PN}-3.initd ${PN} + newconfd "${FILESDIR}"/${PN}-3.confd ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + keepdir "${JABBER_HOME}" + fowners jabber:jabber "${JABBER_HOME}" +} + +pkg_postinst() { + # give an home to jabber user + usermod -d "${JABBER_HOME}" jabber + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + 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/ejabberd/docs/guide_en/" + + if ! use web ; then + ewarn + ewarn "The web USE flag is off, this has disabled the web admin interface." + ewarn + fi + + local i ctlcfg new_ctlcfg + i=0 + ctlcfg=${EROOT}/etc/jabber/ejabberdctl.cfg + while :; do + new_ctlcfg=$(printf "${EROOT}/etc/jabber/._cfg%04d_ejabberdctl.cfg" ${i}) + [[ ! -e ${new_ctlcfg} ]] && break + ctlcfg=${new_ctlcfg} + ((i++)) + done + + ewarn + ewarn "Updating ${ctlcfg} (debug: ${new_ctlcfg})" + sed -e "/#ERLANG_NODE=/aERLANG_NODE=$EJABBERD_NODE" "${ctlcfg}" > "${new_ctlcfg}" || die + + if [[ -e ${EROOT}/var/run/jabber/.erlang.cookie ]]; then + ewarn "Moving .erlang.cookie..." + if [[ -e ${EROOT}/var/spool/jabber/.erlang.cookie ]]; then + mv -v "${EROOT}"/var/spool/jabber/.erlang.cookie{,bak} + fi + mv -v "${EROOT}"/var/{run/jabber,spool/jabber}/.erlang.cookie + fi + ewarn + ewarn "We'll try to handle upgrade automagically but, please, do your" + ewarn "own checks and do not forget to run 'etc-update'!" + ewarn "PLEASE! Run 'etc-update' now!" + fi + + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}" + install_cert /etc/ssl/ejabberd/server + # Fix ssl cert permissions bug #369809 + chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem" + chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem" + if [[ -e ${EROOT}/etc/jabber/ssl.pem ]]; then + ewarn + ewarn "The location of SSL certificates has changed. If you are" + ewarn "upgrading from ${CATEGORY}/${PN}-2.0.5* or earlier you might" + ewarn "want to move your old certificates from /etc/jabber into" + ewarn "/etc/ssl/ejabberd/, update config files and" + ewarn "rm /etc/jabber/ssl.pem to avoid this message." + ewarn + fi +} diff --git a/net-im/ejabberd/files/ejabberd-3.confd b/net-im/ejabberd/files/ejabberd-3.confd new file mode 100644 index 0000000..b1e984e --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-3.confd @@ -0,0 +1,5 @@ +# Please configure everything at /etc/jabber/ejabberdctl.cfg +# Put here only command line arguments for ejabberdctl (if any are required) + +#EJABBERDCTL_OPTS="" + diff --git a/net-im/ejabberd/files/ejabberd-3.initd b/net-im/ejabberd/files/ejabberd-3.initd new file mode 100644 index 0000000..00a28aa --- /dev/null +++ b/net-im/ejabberd/files/ejabberd-3.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-3.initd,v 1.4 2013/04/05 09:03:34 radhermit Exp $ + +depend() { + use dns + need net + provide jabber-server +} + +start() { + if ejabberdctl status >/dev/null 2>&1; then + ewarn "ejabberd is already started (manually?)." + return 0 + fi + ebegin "Starting ejabberd" + /usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} start + eend $? +} + +stop() { + ejabberdctl status >/dev/null 2>&1 + if test $? = 3; then + ewarn "ejabberd is already stopped (manually?)." + return 0 + fi + ebegin "Stopping ejabberd" + if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then + cnt=0 + sleep 1 + while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do + echo -n . + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + eend 1 + break + fi + sleep 1 + done + eend 0 + else + eend 1 + einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on." + fi + eend 0 +} diff --git a/net-im/ejabberd/files/ejabberd.logrotate b/net-im/ejabberd/files/ejabberd.logrotate new file mode 100644 index 0000000..4f32472 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.logrotate @@ -0,0 +1,13 @@ +/var/log/jabber/*.log { + su jabber jabber + weekly + rotate 4 + missingok + nocreate + sharedscripts + notifempty + compress + postrotate + /usr/sbin/ejabberdctl reopen-log > /dev/null 2>&1 || true + endscript +} diff --git a/net-im/ejabberd/files/ejabberd.service b/net-im/ejabberd/files/ejabberd.service new file mode 100644 index 0000000..f6cc7cc --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.service @@ -0,0 +1,15 @@ +[Unit] +Description=A distributed, fault-tolerant Jabber/XMPP server +After=network.target + +[Service] +Type=oneshot +User=jabber +LimitNOFILE=16000 +RestartSec=5 +ExecStart=/usr/sbin/ejabberdctl start +ExecStop=/usr/sbin/ejabberdctl stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/net-im/ejabberd/files/ejabberd.tmpfiles.conf b/net-im/ejabberd/files/ejabberd.tmpfiles.conf new file mode 100644 index 0000000..cf17b73 --- /dev/null +++ b/net-im/ejabberd/files/ejabberd.tmpfiles.conf @@ -0,0 +1 @@ +d /var/lock/ejabberdctl 0750 jabber jabber diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml new file mode 100644 index 0000000..0dd5b42 --- /dev/null +++ b/net-im/ejabberd/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>net-im</herd> + <maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <longdescription> + Free and Open Source distributed fault-tolerant Jabber server. It's + mostly written in Erlang, and works on many platforms. + </longdescription> + <use> + <flag name='mod_irc'>Build irc gateway</flag> + <flag name='mod_muc'>Build Multi User Chat module</flag> + <flag name='mod_pubsub'>Build Pubsub module</flag> + <flag name='web'>Enable web admin interface</flag> + <flag name="captcha">Support for CAPTCHA Forms (XEP-158)</flag> + <flag name="mod_proxy65">Support for SOCKS5 Bytestreams (XEP-0065)</flag> + <flag name="mod_statsdx">Measures several statistics, and provides a new section in ejabberd Web Admin to view them.</flag> + </use> +</pkgmetadata> |