contrib/psybnc/Pkgfile

54 lines
1.3 KiB
Plaintext
Raw Normal View History

2006-11-19 22:26:53 +01:00
# Description: Popular IRC BNC Software.
2008-03-05 04:19:47 +01:00
# URL: http://www.psybnc.at
# Maintainer: Thomas Penteker, tek at serverop dot de
2007-01-20 03:21:06 +01:00
# Packager: James Mills, prologic at shortcircuit dot net dot au
2006-11-19 22:26:53 +01:00
# Depends on:
2006-11-14 00:01:22 +01:00
name=psybnc
2008-07-06 21:49:58 +02:00
version=2.3.2-7
2006-11-14 00:01:22 +01:00
release=1
2008-07-06 21:49:58 +02:00
source=(http://www.psybnc.at/download/beta/psyBNC-$version.tar.gz \
2006-11-19 22:26:53 +01:00
Makefile-patch psybnc.rc makefile.out-patch \
p_string.c-patch p_global.h-patch psybnc.conf ssl.cnf)
2006-11-14 00:01:22 +01:00
psybnc_user=psybnc
error_user() {
2006-11-19 22:26:53 +01:00
echo "ERROR: The user $psybnc_user does not exist!"
echo "Please run the pre-install script"
exit 1
2006-11-14 00:01:22 +01:00
}
build() {
2006-11-19 22:26:53 +01:00
id $psybnc_user || error_user
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
cd $name
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
patch -i $SRC/Makefile-patch
make
patch -i $SRC/makefile.out-patch
patch -i $SRC/p_string.c-patch src/p_string.c
patch -i $SRC/p_global.h-patch src/p_global.h
make -f makefile.out
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
install -d \
$PKG/usr/{bin,share/$name} \
$PKG/etc/{rc.d,$name,$name/key} \
$PKG/var/{log,run}
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
cp -r lang $PKG/usr/share/$name/
cp -r help $PKG/usr/share/$name/
cp -r motd $PKG/usr/share/$name/
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
touch $PKG/var/run/$name.pid
touch $PKG/var/log/$name.log
chown psybnc:users $PKG/var/run/$name.pid
chown psybnc:users $PKG/var/log/$name.log
2006-11-14 00:01:22 +01:00
2006-11-19 22:26:53 +01:00
install -m755 $name $PKG/usr/bin/
install -m755 $SRC/$name.rc $PKG/etc/rc.d/$name
install -m644 $SRC/$name.conf $PKG/etc/$name/
2006-11-14 00:01:22 +01:00
}