summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/err')
-rw-r--r--net-im/err/Manifest1
-rw-r--r--net-im/err/err-1.7.1.ebuild90
-rw-r--r--net-im/err/files/errd.confd9
-rw-r--r--net-im/err/files/errd.initd27
-rw-r--r--net-im/err/metadata.xml20
5 files changed, 147 insertions, 0 deletions
diff --git a/net-im/err/Manifest b/net-im/err/Manifest
new file mode 100644
index 000000000000..9ce6f86dd19f
--- /dev/null
+++ b/net-im/err/Manifest
@@ -0,0 +1 @@
+DIST err-1.7.1.tar.gz 100716 SHA256 a116df7fb4489274b0074c960eebfd7bb938cc777dfc43c773f828aaf9cb5406 SHA512 5be7f6ede6694877e73226de4da58bc47e1230032bc9be8dd3e8fd1448afd1e3ae4c02ecbdb30343b98466bb0d3a8fbfbcb6609c5c50768a9be70b9d22f675a4 WHIRLPOOL a79fd02db047ccfdf25201ade924ed3382d8b729b69bcdebf911d806c167751ec011e62728d9342a4f7c0d8cc6e4b07a40bd5f275ed042ff2451fc17066800e8
diff --git a/net-im/err/err-1.7.1.ebuild b/net-im/err/err-1.7.1.ebuild
new file mode 100644
index 000000000000..68c779f5902d
--- /dev/null
+++ b/net-im/err/err-1.7.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1 eutils user
+
+DESCRIPTION="Plugin based XMPP chatbot designed to be easily deployable, extensible and maintainable"
+HOMEPAGE="http://gbin.github.com/err/"
+
+SRC_URI="mirror://pypi/e/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="irc qt4 +plugins"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/dnspython[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/pyfire[${PYTHON_USEDEP}]
+ dev-python/python-daemon[${PYTHON_USEDEP}]
+ dev-python/xmpppy
+ dev-python/yapsy[${PYTHON_USEDEP}]
+ irc? (
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/twisted-words[${PYTHON_USEDEP}]
+ )
+ qt4? ( dev-python/pyside[${PYTHON_USEDEP},X,webkit] )
+ plugins? ( dev-vcs/git )"
+
+# Testsuite is broken since 1.6.3
+RESTRICT="test"
+
+# NOTES:
+# 1. It has bundled libs - for example exrex(see 'errbot/bundled' subfolder)
+# 2. Need to add PYTHON_USEDEP to remaining dev-python/ deps
+# 3. Support for BOT_SENTRY option is missing, cause
+# we do not have apropriate packages in portage yet
+# 4. Internal web server is broken(dunno why :-()
+
+pkg_setup() {
+ ebegin "Creating err group and user"
+ enewgroup 'err'
+ enewuser 'err' -1 -1 -1 'err'
+ eend ${?}
+}
+
+python_prepare_all() {
+ # Remove configparser and config from requirements as they are NOT needed
+ sed -i \
+ -e "/install_requires/s/'configparser', //" \
+ -e "/install_requires/s/, 'config'//" \
+ setup.py || die
+
+ # Tests are broken and should not be installed
+ rm -r tests || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ newinitd "${FILESDIR}"/errd.initd errd
+ newconfd "${FILESDIR}"/errd.confd errd
+
+ dodir /etc/${PN}
+ dodir /var/lib/${PN}
+ keepdir /var/log/${PN}
+ fowners -R err:err /var/lib/${PN}
+ fowners -R err:err /var/log/${PN}
+
+ insinto /etc/${PN}
+ newins errbot/config-template.py config.py
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # Upstream requires images to be in site-packages directory,
+ # but does not install them at all!
+ if use qt4; then
+ local python_moduleroot=errbot
+ python_domodule errbot/*.svg
+ fi
+}
diff --git a/net-im/err/files/errd.confd b/net-im/err/files/errd.confd
new file mode 100644
index 000000000000..cc70d90b4b43
--- /dev/null
+++ b/net-im/err/files/errd.confd
@@ -0,0 +1,9 @@
+# Path to config directory
+ERR_CONFIG_PATH=/etc/err
+
+# Path to pid file
+ERR_PID_FILE=/var/run/err/err.pid
+
+# User and group to run bot with
+ERR_USER=err
+ERR_GROUP=err
diff --git a/net-im/err/files/errd.initd b/net-im/err/files/errd.initd
new file mode 100644
index 000000000000..053f92fd16ed
--- /dev/null
+++ b/net-im/err/files/errd.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ # create piddir if necessary, bug #448498
+ local piddir=$(dirname ${ERR_PID_FILE})
+ checkpath -q -d -o err:err -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+
+ ebegin "Starting errd"
+ start-stop-daemon --start --make-pidfile --pidfile ${ERR_PID_FILE} --background --quiet -u ${ERR_USER}:${ERR_GROUP} \
+ --exec /usr/bin/python2 -- /usr/bin/err.py -c ${ERR_CONFIG_PATH}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping errd"
+ start-stop-daemon --stop --pidfile ${ERR_PID_FILE}
+ eend $?
+}
diff --git a/net-im/err/metadata.xml b/net-im/err/metadata.xml
new file mode 100644
index 000000000000..2530b60c19c3
--- /dev/null
+++ b/net-im/err/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="irc">Pull optional dependencies, needed for IRC backend</flag>
+ <flag name="plugins">Enable support for installing plugins with <pkg>dev-vcs/git</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gbin/err</remote-id>
+ <maintainer status="active">
+ <email>gbin@gootz.net</email>
+ <name>Guillaume BINET</name>
+ </maintainer>
+ <remote-id type="pypi">err</remote-id>
+ </upstream>
+</pkgmetadata>