contrib/psybnc/Pkgfile

55 lines
1.3 KiB
Plaintext
Raw Normal View History

2006-11-19 22:26:53 +01:00
# Description: Popular IRC BNC Software.
# URL: http://www.psychoid.net/psybnc.html
2007-01-20 03:21:06 +01:00
# Maintainer: James Mills, prologic at shortcircuit dot net dot au
# 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
version=2.3.1
release=1
source=(http://www.psychoid.net/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
}