diff options
Diffstat (limited to 'extra/bitlbee')
-rw-r--r-- | extra/bitlbee/PKGBUILD | 16 | ||||
-rw-r--r-- | extra/bitlbee/rc.d | 40 | ||||
-rw-r--r-- | extra/bitlbee/xinetd | 12 |
3 files changed, 59 insertions, 9 deletions
diff --git a/extra/bitlbee/PKGBUILD b/extra/bitlbee/PKGBUILD index 15d0d5ae2..6f63f350a 100644 --- a/extra/bitlbee/PKGBUILD +++ b/extra/bitlbee/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 113245 2011-03-08 11:01:22Z bisson $ +# $Id: PKGBUILD 118945 2011-04-09 14:35:19Z bisson $ # Contributor: FUBAR <mrfubar@gmail.com> # Contributor: simo <simo@archlinux.org> # Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org> @@ -7,7 +7,7 @@ pkgname=bitlbee pkgver=3.0.2 -pkgrel=1 +pkgrel=2 pkgdesc='Brings instant messaging (XMPP, MSN, Yahoo!, AIM, ICQ, Twitter) to IRC' arch=('i686' 'x86_64') url='http://www.bitlbee.org/' @@ -15,11 +15,11 @@ license=('GPL') depends=('gnutls' 'glib2' 'libotr') optdepends=('xinetd: to run bitlbee through xinetd') source=("http://get.bitlbee.org/src/${pkgname}-${pkgver}.tar.gz" - 'bitlbee.xinetd' - 'bitlbee.rcd') + 'xinetd' + 'rc.d') sha1sums=('59113b1dc440ebd775e6cf324d1cfb698fb20cfc' '5e0af27ba9cc4fe455e3381c75fc49a9326e2f17' - '299776783902cc2e20be49e2fe729572ca656383') + 'be09d29af3853825778331df451f16ca9e452d03') backup=('etc/bitlbee/bitlbee.conf' 'etc/bitlbee/motd.txt' 'etc/xinetd.d/bitlbee') install=install @@ -40,11 +40,9 @@ build() { package() { cd "${srcdir}/${pkgname}-${pkgver}" - install -dm755 "${pkgdir}"/var/{lib,run} install -o65 -g65 -dm770 "${pkgdir}"/var/lib/bitlbee - install -o65 -g65 -dm755 "${pkgdir}"/var/run/bitlbee - install -Dm644 "${srcdir}"/bitlbee.xinetd "${pkgdir}"/etc/xinetd.d/bitlbee - install -Dm755 "${srcdir}"/bitlbee.rcd "${pkgdir}"/etc/rc.d/bitlbee + install -Dm644 "${srcdir}"/xinetd "${pkgdir}"/etc/xinetd.d/bitlbee + install -Dm755 "${srcdir}"/rc.d "${pkgdir}"/etc/rc.d/bitlbee make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" install-etc diff --git a/extra/bitlbee/rc.d b/extra/bitlbee/rc.d new file mode 100644 index 000000000..bd9248173 --- /dev/null +++ b/extra/bitlbee/rc.d @@ -0,0 +1,40 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +name=bitlbee +PID=$(pidof -o %PPID /usr/sbin/bitlbee) +install -o bitlbee -g bitlbee -d -m 755 /var/run/bitlbee + +case "$1" in +start) + stat_busy "Starting $name daemon" + [[ -z "$PID" ]] && { + rm -f /var/run/bitlbee/bitlbee.pid + su -s /bin/sh -c '/usr/sbin/bitlbee -F' bitlbee + } && { + add_daemon $name + stat_done + } || { stat_fail; exit 1; } + ;; +stop) + stat_busy "Stopping $name daemon" + [[ -n "$PID" ]] && { + kill $PID &>/dev/null + } && { + rm -f /var/run/bitlbee/bitlbee.pid + rm_daemon $name + stat_done + } || { stat_fail; exit 1; } + ;; +restart) + $0 stop + sleep 3 + $0 start + ;; +*) + echo "usage: $0 {start|stop|restart}" + exit 1 + ;; +esac diff --git a/extra/bitlbee/xinetd b/extra/bitlbee/xinetd new file mode 100644 index 000000000..d671a8cfc --- /dev/null +++ b/extra/bitlbee/xinetd @@ -0,0 +1,12 @@ +service bitlbee +{ + type = UNLISTED + socket_type = stream + protocol = tcp + wait = no + user = bitlbee + group = bitlbee + server = /usr/sbin/bitlbee + port = 6667 + disable = yes +} |