diff --git a/net-im/punjab/Manifest b/net-im/punjab/Manifest new file mode 100644 index 0000000..2845abb --- /dev/null +++ b/net-im/punjab/Manifest @@ -0,0 +1,2 @@ +AUX punjab-initd 606 RMD160 7fe2a63a91ba0894dea5545e4baca2c5b235b446 SHA1 9136218bb3e5c25b9f9646ad5d98eae317501814 SHA256 54127766b552e792bf1f84d5e5fc473319b0667223dcbc4b423983ef9880610c +EBUILD punjab-9999.ebuild 1405 RMD160 355062c1dc42c969610a36f57233facd691cef82 SHA1 abdb66cd2b0f50871cdbb6a384e70b614425b67c SHA256 2553ea692e8aeadd7541e8d61c50cf9c18bc0054d5477a9e5abd63aa02736305 diff --git a/net-im/punjab/files/punjab-initd b/net-im/punjab/files/punjab-initd new file mode 100644 index 0000000..3ab13a8 --- /dev/null +++ b/net-im/punjab/files/punjab-initd @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + use jabber-server +} + +start() { + ebegin "Starting Punjab BOSH connection manager" + start-stop-daemon --start --pidfile /var/run/jabber/punjab.pid -u jabber -g jabber \ + --exec /usr/bin/twistd -- -f /etc/jabber/punjab.tap -l /var/log/jabber/punjab.log \ + --pidfile /var/run/jabber/punjab.pid + eend $? +} + +stop() { + ebegin "Stopping Punjab BOSH connection manager" + start-stop-daemon --stop --quiet --pidfile /var/run/jabber/punjab.pid + eend $? +} diff --git a/net-im/punjab/punjab-9999.ebuild b/net-im/punjab/punjab-9999.ebuild new file mode 100644 index 0000000..0cb191e --- /dev/null +++ b/net-im/punjab/punjab-9999.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 +PYTHON_DEPEND="2" + +inherit distutils eutils python git-2 +DESCRIPTION="BOSH connection manager for jabber implemented in python" +HOMEPAGE="https://github.com/twonds/punjab" +EGIT_REPO_URI="git://github.com/twonds/punjab" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="tls" +DEPEND="net-im/jabber-base" +RDEPEND=">=dev-python/twisted-11.1.0 + tls? ( dev-python/pyopenssl ) + ${DEPEND}" + +pkg_setup() { + python_set_active_version 2 +} + +src_compile() { + # nothing to be done here? + distutils_src_compile +} + +src_install() { + distutils_src_install + + insinto /etc/jabber + newins example-config.xml ${PN}.xml + fperms 600 /etc/jabber/${PN}.xml + fowners jabber:jabber /etc/jabber/${PN}.xml + dosed \ + "s:[^\<]*:/var/spool/jabber:" \ + /etc/jabber/${PN}.xml + +# dosed \ +# "s:[^\<]*:/var/run/jabber/${PN}.pid:" \ +# /etc/jabber/${PN}.xml + + newinitd "${FILESDIR}/${PN}-initd" ${PN} +# dosed "s:INSPATH:${inspath}:" /etc/init.d/${PN} + +} + +pkg_postinst() { + einfo "A sample config file has been installed into /etc/jabber/${PN}.xml." + einfo "Please adjust the settings as needed." + einfo "After that, you MUST create a TAP-file for twisted in order to start Punjab, like this:" + einfo "# cd /etc/jabber" + einfo "# mktap punjab -c punjab.xml" +}