Commit c9a4fa80 authored by abveritas's avatar abveritas

Adding bitlbee 3.0.1, an IRC to IM gateway

parent 9bfef238
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=bitlbee
pkgver=3.0
pkgrel=1
pkgdesc="An IRC to IM gateway. Supports MSN, ICQ, Jabber, Yahoo!, and AIM"
arch=('i686' 'x86_64')
url="http://www.bitlbee.org/"
license=('GPL')
depends=('gnutls' 'glib2')
optdepends=('xinetd: to run bitlbee through xinetd')
install=${pkgname}.install
backup=(etc/bitlbee/bitlbee.conf etc/bitlbee/motd.txt etc/xinetd.d/bitlbee)
source=(http://get.bitlbee.org/src/${pkgname}-${pkgver}.tar.gz
'bitlbee.xinetd'
'bitlbee.rcd')
md5sums=('455fc8070d758c2bb3442ef4c709ad69'
'81e576369e31377f5217e636b00874b1'
'8cf7500982838f5273ee025eeabfa7fb')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure --prefix=/usr \
--ssl=gnutls \
--etcdir=/etc/bitlbee \
--pidfile=/var/run/bitlbee/bitlbee.pid \
--ipcsocket=/var/run/bitlbee/bitlbee.sock || return 1
make || return 1
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
install -dm755 ${pkgdir}/var/lib
install -o65 -g65 -dm0770 ${pkgdir}/var/lib/bitlbee
install -dm755 ${pkgdir}/var/run
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 || return 1
make DESTDIR=${pkgdir} install || return 1
make DESTDIR=${pkgdir} install-etc || return 1
make DESTDIR=${pkgdir} install-dev || return 1
}
post_install() {
echo "-> Bitlbee can run through xinetd or as a daemon for now."
if [ ! `grep bitlbee /etc/group` ]; then
groupadd -g 65 bitlbee &>/dev/null;
fi
id bitlbee &>/dev/null || \
useradd -u 65 -g bitlbee -d /var/lib/bitlbee -s /bin/false bitlbee
}
post_upgrade() {
post_install $1
}
post_remove() {
getent passwd bitlbee >/dev/null 2>&1 && userdel bitlbee
getent group bitlbee >/dev/null 2>&1 && groupdel bitlbee
}
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
get_pid() {
pidof -o %PPID /usr/sbin/bitlbee
}
case "$1" in
start)
stat_busy 'Starting Bitlbee'
PID=$(get_pid)
if [ -z "$PID" ]; then
[ -f /var/run/bitlbee/bitlbee.pid ] && rm -f /var/run/bitlbee/bitlbee.pid
su -s /bin/sh -c '/usr/sbin/bitlbee -F' 'bitlbee'
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
add_daemon bitlbee
stat_done
fi
else
stat_fail
exit 1
fi
;;
stop)
stat_busy 'Stopping Bitlbee'
PID=$(get_pid)
# KILL
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm -f /var/run/bitlbee/bitlbee.pid &> /dev/null
rm_daemon bitlbee
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
service bitlbee
{
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = bitlbee
group = bitlbee
server = /usr/sbin/bitlbee
port = 6667
disable = yes
}
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