diff options
Diffstat (limited to 'community/leafnode')
-rw-r--r-- | community/leafnode/PKGBUILD | 29 | ||||
-rw-r--r-- | community/leafnode/leafnode.install | 20 | ||||
-rw-r--r-- | community/leafnode/leafnode.xinetd | 18 |
3 files changed, 67 insertions, 0 deletions
diff --git a/community/leafnode/PKGBUILD b/community/leafnode/PKGBUILD new file mode 100644 index 000000000..0b96590ab --- /dev/null +++ b/community/leafnode/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 18744 2010-06-14 12:55:42Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# You need an news user and group to build this package + +pkgname=leafnode +pkgver=1.11.8 +pkgrel=1 +pkgdesc="implements a store & forward NNTP proxy (client and server) with IPv4 and IPv6" +arch=('i686' 'x86_64') +url="http://leafnode.sourceforge.net/" +depends=(pcre xinetd) +license=('GPL') +install=(leafnode.install) +options=(!emptydirs) +backup=(etc/xinet.d/leafnode) +source=(http://downloads.sf.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 + leafnode.xinetd) +md5sums=('a3edafeb854efaa3fbb0f7951d02160f' + 'db3c6ad1ff9fc03442949456d1d21304') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc/leafnode + make || return 1 + make DESTDIR=$pkgdir install && \ + chown -R root.root $pkgdir && \ + install -D -m0644 $srcdir/leafnode.xinetd $pkgdir/etc/xinetd.d/leafnode +} + diff --git a/community/leafnode/leafnode.install b/community/leafnode/leafnode.install new file mode 100644 index 000000000..eb942009e --- /dev/null +++ b/community/leafnode/leafnode.install @@ -0,0 +1,20 @@ +post_install() { + echo "-- Adding user 'news' and group 'news', chowning /var/spool/news" + groupadd -K GID_MIN=5000 news &>/dev/null + gid=`cat /etc/group | grep news | cut -d: -f 3` + useradd -u $gid -g news -d /var/spool/news -s /bin/false news &>/dev/null + chown -R root:news etc/leafnode + + # create dir if necessary + if [ ! -d var/spool/news ]; then + install -d -m 770 -o news -g news var/spool/news + fi +} + +post_remove() { + echo "-- Removing user 'news' and group 'news', deleting spool directory" + userdel news &>/dev/null + groupdel news &>/dev/null + rm -rf var/spool/news +} + diff --git a/community/leafnode/leafnode.xinetd b/community/leafnode/leafnode.xinetd new file mode 100644 index 000000000..94c7c6ca7 --- /dev/null +++ b/community/leafnode/leafnode.xinetd @@ -0,0 +1,18 @@ +# +# /etc/xinetd.d/leafnode +# + +service nntp +{ + socket_type = stream + wait = no + user = news + server = /usr/sbin/leafnode + log_type = SYSLOG news + log_on_success += USERID + log_on_failure += USERID + port = 119 + disable = yes + groups = yes +} + |