diff options
Diffstat (limited to 'community/leafnode')
-rw-r--r-- | community/leafnode/PKGBUILD | 19 | ||||
-rw-r--r-- | community/leafnode/leafnode.install | 11 |
2 files changed, 13 insertions, 17 deletions
diff --git a/community/leafnode/PKGBUILD b/community/leafnode/PKGBUILD index f9782f1fa..a09bf47e4 100644 --- a/community/leafnode/PKGBUILD +++ b/community/leafnode/PKGBUILD @@ -1,18 +1,18 @@ -# $Id: PKGBUILD 58613 2011-11-16 15:33:07Z spupykin $ +# $Id: PKGBUILD 58812 2011-11-18 15:35:58Z 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 +pkgrel=2 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) +depends=('pcre' 'xinetd') license=('GPL') install=leafnode.install options=(!emptydirs) -backup=(etc/xinet.d/leafnode) +backup=('etc/xinetd.d/leafnode') source=(http://downloads.sf.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 leafnode.xinetd) md5sums=('a3edafeb854efaa3fbb0f7951d02160f' @@ -20,10 +20,11 @@ md5sums=('a3edafeb854efaa3fbb0f7951d02160f' 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 && \ + ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc/leafnode \ + --with-user=9 \ + --with-group=13 + make + 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 index eb942009e..f1a046e1c 100644 --- a/community/leafnode/leafnode.install +++ b/community/leafnode/leafnode.install @@ -1,10 +1,8 @@ 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 + grep -e "^news:" /etc/group 2>&- >&- || groupadd -g 13 -r news 2>&- >&- + grep -e "^news:" /etc/passwd 2>&- >&- || useradd -u 9 -r -m -g news news 2>&- >&- 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 @@ -12,9 +10,6 @@ post_install() { } post_remove() { - echo "-- Removing user 'news' and group 'news', deleting spool directory" - userdel news &>/dev/null - groupdel news &>/dev/null + echo "-- Deleting spool directory" rm -rf var/spool/news } - |