#Maintainer: Thorsten Muehlfelder #Mandatory pkgname=opennap-ng pkgver=0.49.1 pkgrel=1 zenver=60 arch=i486 source=("http://switch.dl.sourceforge.net/sourceforge/opennap-ng/${pkgname}-${pkgver}-src.tar.gz" "rc.opennap") sourcetemplate=http://thenktor.dyndns.org/packages/$pkgname/ #Optional dotnew=('/usr/share/opennap-ng/opennap-block-ban.txt' '/usr/share/opennap-ng/opennap-block.txt' '/usr/share/opennap-ng/opennap-channels.txt' '/usr/share/opennap-ng/opennap-config.txt' '/usr/share/opennap-ng/opennap-filter.txt' '/usr/share/opennap-ng/opennap-motd.txt' '/usr/share/opennap-ng/opennap-servers.txt' '/usr/share/opennap-ng/opennap-users.txt') url="http://opennap-ng.sourceforge.net/" slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname - A P2P filesharing server" "Opennap NG is a free, non-commercial open source server software," "serving the original Napster peer 2 peer filesharing protocol, to be" "used with clients such as Lopster/WinLop, XNap, WinMX and others. Feel" "free to become an Opennap NG server owner by yourself and serve the" "community." "This project is not affiliated to http://opennap-ng.org, which was" "created recently, based on an older Opennap NG source version with" "less features and bugfixes (compare changelogs)." ) build() { cd $startdir/src/${pkgname}-$pkgver ./autogen.sh || return 1 ./configure --prefix=/usr -sysconfdir=/etc --with-uid=nobody --with-gid=nogroup || return 1 make -j3 || return 1 make DESTDIR=$startdir/pkg install || return 1 # install the rc file mkdir -p -m 755 $startdir/pkg/etc/rc.d/desc.d || return 1 install -m 755 $startdir/rc.opennap $startdir/pkg/etc/rc.d/ || return 1 echo "opennap:The OpenNap-ng P2P server:opennap" > $startdir/pkg/etc/rc.d/desc.d/opennap.txt # create correct doc dir and remove the wrong one mkdir -p $startdir/pkg/usr/doc/opennap-ng-$pkgver mv $startdir/pkg/usr/share/docs/opennap-ng/* $startdir/pkg/usr/doc/opennap-ng-$pkgver/ || return 1 rm -r /pkg/usr/share/docs/ # create the quickstart file cat << EOF > $startdir/pkg/usr/doc/opennap-ng-$pkgver/QUICKSTART opennap-ng will run as user nobody, group nogroup Please check your config files in /usr/share/opennap-ng IMPORTANT: do not start the server without at least basic customization of the files opennap-config.txt and opennap-users.txt! See opennap-ng-0.49-manual.html for a complete setup manual. EOF } doinst() { # set owner of conf files to nobody:nogroup chown -R nobody:nogroup usr/share/opennap-ng cat << EOF opennap-ng will run as user nobody, group nogroup Please check your config files in /usr/share/opennap-ng IMPORTANT: do not start the server without at least basic customization of the files opennap-config.txt and opennap-users.txt! See opennap-ng-0.49-manual.html for a complete setup manual. EOF }