diff options
Diffstat (limited to 'community/minbif')
-rw-r--r-- | community/minbif/PKGBUILD | 39 | ||||
-rw-r--r-- | community/minbif/minbif | 49 | ||||
-rw-r--r-- | community/minbif/minbif.install | 18 |
3 files changed, 106 insertions, 0 deletions
diff --git a/community/minbif/PKGBUILD b/community/minbif/PKGBUILD new file mode 100644 index 000000000..091830228 --- /dev/null +++ b/community/minbif/PKGBUILD @@ -0,0 +1,39 @@ +# $Id: PKGBUILD 44211 2011-04-04 13:30:46Z lfleischer $ +# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> +# Contributor: AkiraYB <brunoyb!yahoo,com,br> + +pkgname=minbif +pkgver=1.0.4 +pkgrel=2 +pkgdesc='An IRC gateway to IM networks that uses libpurple.' +arch=('i686' 'x86_64') +url='http://minbif.im/' +license=('GPL2') +depends=('gnutls' 'libcaca' 'libpurple') +makedepends=('cmake') +optdepends=('xinetd: to run minbif through xinetd') +backup=('etc/minbif/minbif.conf' + 'etc/minbif/minbif.motd') +install='minbif.install' +source=("http://minbif.im/attachments/download/90/${pkgname}-${pkgver}.tar.gz" + 'minbif') +md5sums=('25069fb6015dfb9ddc24ef2e09e74da3' + '307a6fab42bcaeed11a55b5fb4589778') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make PREFIX=/usr CONF_PREFIX=/etc/minbif ENABLE_MINBIF=ON ENABLE_IMLIB=ON ENABLE_CACA=ON \ + ENABLE_VIDEO=ON ENABLE_PLUGIN=OFF ENABLE_PAM=ON ENABLE_TLS=ON DEBUG=OFF +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + install -dm0755 "${pkgdir}/var/lib" + install -dm0770 -o67 -g67 "${pkgdir}/var/lib/minbif" + install -dm0770 -o67 -g67 "${pkgdir}/var/lib/minbif/users" + install -Dm0755 "${srcdir}/minbif" "${pkgdir}/etc/rc.d/minbif" + + make DESTDIR="${pkgdir}" install +} diff --git a/community/minbif/minbif b/community/minbif/minbif new file mode 100644 index 000000000..47888d169 --- /dev/null +++ b/community/minbif/minbif @@ -0,0 +1,49 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/minbif` +case "$1" in + start) + stat_busy "Starting minbif daemon" + if [ -z "$PID" ]; then + if [ ! -d /var/run/minbif ]; then + mkdir -p /var/run/minbif && chown minbif:minbif /var/run/minbif + fi + [ -f /var/run/minbif/minbif.pid ] && rm -f /var/run/minbif/minbif.pid + CMD='/usr/bin/minbif --pidfile /var/run/minbif/minbif.pid \ + /etc/minbif/minbif.conf' + su -s /bin/sh -c "$CMD" minbif + + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon minbif + stat_done + fi + else + stat_fail + fi + ;; + + stop) + stat_busy "Stopping minbif daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /var/run/minbif/minbif.pid + rm_daemon minbif + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community/minbif/minbif.install b/community/minbif/minbif.install new file mode 100644 index 000000000..264763407 --- /dev/null +++ b/community/minbif/minbif.install @@ -0,0 +1,18 @@ +post_install() { + grep -qs ^minbif: /etc/group || groupadd -g 67 minbif + grep -qs ^minbif: /etc/passwd || useradd -u 67 -g minbif \ + -d /var/lib/minbif -s /bin/false minbif + + chown -R minbif:minbif /var/lib/minbif + chmod 0770 /var/lib/minbif + chmod 0770 /var/lib/minbif/users +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + grep -qs ^minbif: /etc/passwd && userdel minbif + grep -qs ^minbif: /etc/group && groupdel minbif +} |