Commit ef3ce7bd authored by Francesco Colista's avatar Francesco Colista
Browse files

testing/atheme-iris: new apkbuild. Fixes #1462

parent f159beed
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=atheme-iris
pkgver=0_git20130227
pkgrel=0
pkgdesc="AJAX IRC client. It is a drop-in replacement for qwebirc."
url="http://www.atheme.net/iris.html"
arch="noarch"
license="GPL"
depends="py-twisted py-twisted-names py-twisted-mail py-twisted-web \
py-twisted-words py-simplejson py-openssl py-zope-interface"
depends_dev=""
makedepends="$depends_dev python-dev"
install="$pkgname.post-install $pkgname.pre-install"
subpackages=""
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd"
pkgusers="iris"
pkggroups="iris"
_builddir="$srcdir"/$pkgname-$pkgver
giturl="git://github.com/atheme/iris.git"
disturl="dev.alpinelinux.org:/archive/$pkgname"
build() {
cd "$_builddir"
return 0
}
package() {
cd "$_builddir"
mkdir -p $pkgdir/etc/$pkgname
mkdir -p $pkgdir/var/lib/$pkgname
mkdir -p $pkgdir/var/log/$pkgname
mkdir -p $pkgdir/etc/conf.d
mkdir -p $pkgdir/etc/init.d
mkdir -p $pkgdir/var/run/$pkgname
cp "$srcdir"/$pkgname.confd $pkgdir/etc/conf.d/$pkgname
cp "$srcdir"/$pkgname.initd $pkgdir/etc/init.d/$pkgname
cp -r * $pkgdir/var/lib/$pkgname
cp iris.conf.example $pkgdir/etc/$pkgname/iris.conf
ln -s /etc/$pkgname/iris.conf $pkgdir/var/lib/$pkgname/iris.conf
chown iris:iris $pkgdir/var/log/$pkgname
chown iris:iris $pkgdir/var/run/$pkgname
chown -R iris:iris $pkgdir/var/lib/$pkgname
}
md5sums="b1673663f8891a69a0c746cd3fb0098e atheme-iris-0_git20130227.tar.gz
2e28fb06e4d237ae10f633185ddaf1dc atheme-iris.initd
cb92c7f09b3f8ed203aef46f1ef25a29 atheme-iris.confd"
sha256sums="e6a61f2a50e22dfea06d4e1aef321dd2e1e320f59feb59f2c69e3a45435723e6 atheme-iris-0_git20130227.tar.gz
3f5f889df409dead4f50d5a671813d104660e61ebe840f9e00dbc8b990011408 atheme-iris.initd
708edb2a717e016882d3583b951b63a97fbc48ee769437db74b155a357ad34d7 atheme-iris.confd"
sha512sums="6c1cc6a4faf4fae71fe1b9ac5c53cf099e842114548ba8b746d7facd31d3b9bfec0f212a9a41a1046be77857d04fc0bcdc110c115cbaa876917f861130d58b36 atheme-iris-0_git20130227.tar.gz
af08503060dfe5d66c62dc47515321140cc3920fa082e83102f40ad511977bf1dd683a79922ddb507bbca5a6dba987a5481a7e62ea02e7a94e900bb2c83f9aee atheme-iris.initd
5bd29bc0d46387d15e9f2bcdc5ac66ec6f8e1e1d821a36a5440253ad362df46728278410d1b0f172540713d63be58a92b487d226f91353cb1997e93bfb6d2d9a atheme-iris.confd"
SVCHOME="/var/lib/atheme-iris"
SVCPID="/var/run/atheme-iris/atheme-iris.pid"
LOGFILE="/var/log/atheme-iris/atheme-iris.log"
PORT="9090"
IP="0.0.0.0"
ARGS="-p ${PORT} -i ${IP} -l ${LOGFILE} -P ${SVCPID}"
#!/sbin/runscript
# Copyright 2013 Alpine Linux
# Distributed under the terms of the GNU General Public License v2
extra_stopped_commands="setup"
depend() {
use net
need localmount
}
setup() {
ebegin "Setting up ${SVCNAME}"
cd /var/lib/atheme-iris
python ./clean.py
python ./compile.py
echo "atheme-iris has been compiled succesfully."
echo "Now you can start the daemon with /etc/init.d/atheme-iris start"
eend $?
}
start() {
ebegin "Starting ${SVCNAME}"
if [ -f /var/lib/atheme-iris/.compiled ]; then
cd ${SVCHOME}
nohup python ./run.py ${ARGS} &>/dev/null &
else
eerror "You must first run /etc/init.d/atheme-iris setup"
fi
setup()
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
if [ -f /var/run/atheme-iris/atheme-iris.pid ]; then
kill $(cat /var/run/atheme-iris/atheme-iris.pid)
else
eerror "atheme-iris is not running."
fi
eend $?
}
#!/bin/sh
echo "************************************************************************************************"
echo "***** Before starting atheme-iris, you need to: *****"
echo "***** *****"
echo "***** 1 - Modify /etc/atheme-iris/iris.conf *****"
echo "***** 2 - make a symlink from /etc/atheme-iris/iris.conf to /var/lib/atheme-iris/iris.conf *****"
echo "***** 3 - Run /etc/init.d/atheme-iris setup *****"
echo "************************************************************************************************"
#!/bin/sh
adduser -H -h /usr/share/webapps/atheme-iris -g iris -D -s /bin/false iris >/dev/null
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment