Initial commit

This commit is contained in:
Florian Bruhin 2012-11-01 16:01:40 +01:00
commit e171a6a327
5 changed files with 175 additions and 0 deletions

31
.SRCINFO Normal file
View file

@ -0,0 +1,31 @@
pkgbase = bitlbee-bzr
pkgdesc = Brings instant messaging (XMPP, MSN, Yahoo!, AIM, ICQ, Twitter) to IRC
pkgver = 916
pkgrel = 1
url = http://bitlbee.org
install = bitlbee.install
arch = i686
arch = x86_64
license = GPL
makedepends = bzr
makedepends = asciidoc
makedepends = libotr
makedepends = xmlto
makedepends = lynx
depends = openssl
depends = glib2
optdepends = skype4py: to use skyped
optdepends = libotr: for OTR encryption support
optdepends = xinetd: to run bitlbee through xinetd
provides = bitlbee
conflicts = bitlbee
backup = etc/bitlbee/bitlbee.conf
backup = etc/bitlbee/motd.txt
backup = etc/xinetd.d/bitlbee
source = xinetd
source = rc.d
sha1sums = 5e0af27ba9cc4fe455e3381c75fc49a9326e2f17
sha1sums = be09d29af3853825778331df451f16ca9e452d03
pkgname = bitlbee-bzr

72
PKGBUILD Normal file
View file

@ -0,0 +1,72 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Patrick Burroughs (Celti) <celticmadman@gmail.com>
# Maintainer: Florian Bruhin (The-Compiler) <archlinux.org@the-compiler.org>
pkgname=bitlbee-bzr
pkgver=916
pkgrel=1
pkgdesc='Brings instant messaging (XMPP, MSN, Yahoo!, AIM, ICQ, Twitter) to IRC'
url="http://bitlbee.org"
license=('GPL')
arch=('i686' 'x86_64')
depends=('openssl' 'glib2')
makedepends=('bzr' 'asciidoc' 'libotr' 'xmlto' 'lynx')
optdepends=('skype4py: to use skyped'
'libotr: for OTR encryption support'
'xinetd: to run bitlbee through xinetd')
source=('xinetd' 'rc.d')
sha1sums=('5e0af27ba9cc4fe455e3381c75fc49a9326e2f17'
'be09d29af3853825778331df451f16ca9e452d03')
backup=('etc/bitlbee/bitlbee.conf' 'etc/bitlbee/motd.txt' 'etc/xinetd.d/bitlbee')
install="bitlbee.install"
provides=('bitlbee')
conflicts=('bitlbee')
_bzrtrunk=http://code.bitlbee.org/bitlbee/
_bzrmod=bitlbee
build() {
cd "$srcdir"
msg "Connecting to Bazaar server...."
if [[ -d "$_bzrmod" ]]; then
cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
msg "The local files are updated."
else
bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
fi
msg "Bazaar checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_bzrmod-build"
cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
cd "$srcdir/$_bzrmod-build"
./configure \
--prefix=/usr \
--etcdir=/etc/bitlbee \
--pidfile=/var/run/bitlbee/bitlbee.pid \
--ipcsocket=/var/run/bitlbee/bitlbee.sock \
--systemdsystemunitdir=/usr/lib/systemd/system \
--ssl=openssl \
--strip=0 \
--otr=plugin \
--skype=plugin \
make
}
package() {
cd "$srcdir/$_bzrmod-build"
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
make DESTDIR="${pkgdir}" install-dev
}
# vim:set ts=2 sw=2 et:

20
bitlbee.install Normal file
View file

@ -0,0 +1,20 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Patrick Burroughs (Celti) <celticmadman@gmail.com>
# Maintainer: Florian Bruhin (The-Compiler) <archlinux.org@the-compiler.org>
post_install() {
getent group bitlbee &>/dev/null || groupadd -r bitlbee >/dev/null
getent passwd bitlbee &>/dev/null || useradd -r -g bitlbee -d /var/lib/bitlbee -s /bin/false -c bitlbee bitlbee >/dev/null
}
post_upgrade() {
post_install
}
post_remove() {
getent passwd bitlbee &>/dev/null && userdel bitlbee >/dev/null
getent group bitlbee &>/dev/null && groupdel bitlbee >/dev/null
true
}
# vim:set ts=2 sw=2 et:

40
rc.d Normal file
View file

@ -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

12
xinetd Normal file
View file

@ -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
}