diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/quassel |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/quassel')
-rw-r--r-- | community/quassel/PKGBUILD | 45 | ||||
-rw-r--r-- | community/quassel/quassel.conf | 2 | ||||
-rw-r--r-- | community/quassel/quassel.install | 26 | ||||
-rw-r--r-- | community/quassel/rc.quassel | 41 |
4 files changed, 114 insertions, 0 deletions
diff --git a/community/quassel/PKGBUILD b/community/quassel/PKGBUILD new file mode 100644 index 000000000..9c3187863 --- /dev/null +++ b/community/quassel/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 40740 2011-02-26 12:03:19Z jlichtblau $ +# Maintainer: Vesa Kaihlavirta <vegai@iki.fi> + +pkgname=quassel +pkgver=0.7.1 +pkgrel=1 +pkgdesc="QT4 irc client with a separated core" +arch=('i686' 'x86_64') +url="http://quassel-irc.org/" +license=('GPL') +depends=('kdelibs' 'oxygen-icons' 'hicolor-icon-theme') +makedepends=('cmake' 'automoc4') +install=$pkgname.install +backup=(etc/conf.d/quassel.conf) +source=(http://quassel-irc.org/pub/$pkgname-$pkgver.tar.bz2 + rc.$pkgname + $pkgname.conf) +sha256sums=('914a9cd21bfe4be1f78b2f6c96e54b52db7ed3c0adc4dce6bfabec38a30f7ecd' + '845e621448a51ec181554e9327bfcc3a3de1501ae8f70410f0b9b8991ac171b0' + 'f3031ea8217e01ba42cea14606169e3e27affa5918968ffd5a03c21ae92fe2b8') + +build() { + [[ ! -d build ]] && mkdir build + cd build + + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr/ \ + -DWITH_KDE=1 \ + -DCMAKE_BUILD_TYPE="Release" \ + ../${pkgname}-${pkgver}/ \ + -Wno-dev + + make +} + +package() { + cd build + + make DESTDIR=${pkgdir} install + + install -D ${srcdir}/rc.$pkgname \ + ${pkgdir}/etc/rc.d/$pkgname + install -D -m644 ${srcdir}/$pkgname.conf \ + ${pkgdir}/etc/conf.d/$pkgname +} diff --git a/community/quassel/quassel.conf b/community/quassel/quassel.conf new file mode 100644 index 000000000..6b667d8d4 --- /dev/null +++ b/community/quassel/quassel.conf @@ -0,0 +1,2 @@ +QUASSEL_USER=quassel +LISTEN=127.0.0.1 diff --git a/community/quassel/quassel.install b/community/quassel/quassel.install new file mode 100644 index 000000000..289ecc63f --- /dev/null +++ b/community/quassel/quassel.install @@ -0,0 +1,26 @@ +post_install() { + useradd -r -s /bin/sh -d /var/lib/quassel quassel + mkdir -p /var/lib/quassel && chown -R quassel:quassel /var/lib/quassel + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + [ `vercmp $2 0.5.2-1` -le 0 ] && ( + cat <<EOF + +==> - quasselcore now runs as the quassel user +==> - quasselcore now listens to port 127.0.0.1 by default +==> - both of above are configurable: /etc/conf.d/quassel +EOF + /etc/rc.d/quassel stop + post_install + ) || true +} + +pre_remove() { + /etc/rc.d/quassel stop +} + +post_remove() { + userdel quassel +} diff --git a/community/quassel/rc.quassel b/community/quassel/rc.quassel new file mode 100644 index 000000000..99b82eec9 --- /dev/null +++ b/community/quassel/rc.quassel @@ -0,0 +1,41 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/quassel + +PIDFILE=/var/run/quassel.pid +PID=`pidof -o %PPID /usr/bin/quasselcore` + +case "$1" in + start) + stat_busy "Starting Quassel Core" + [ -z "$PID" ] && su -l -c "/usr/bin/quasselcore --configdir=/var/lib/quassel --listen=$LISTEN &" $QUASSEL_USER &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + echo $PID > $PIDFILE + add_daemon quassel + stat_done + fi + ;; + stop) + stat_busy "Stopping Quassel Core" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f $PIDFILE + rm_daemon quassel + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |