diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-09-19 11:59:33 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-09-19 11:59:33 -0500 |
commit | e40531aab32ff93b1f9da20d8a43a440d8dffaca (patch) | |
tree | 837260c74cb8eef56e640ee52b2e329e13719276 /community/leafnode | |
parent | 6fab33c9210eaa90d0a0179f7e49c339ea88990f (diff) | |
parent | 171f25215eee368fe64f1eed02ce49de090f4b0d (diff) |
Merge branch 'master' of gitpar:abslibre-mips64el
Diffstat (limited to 'community/leafnode')
-rw-r--r-- | community/leafnode/PKGBUILD | 24 | ||||
-rw-r--r-- | community/leafnode/leafnode.install | 12 |
2 files changed, 16 insertions, 20 deletions
diff --git a/community/leafnode/PKGBUILD b/community/leafnode/PKGBUILD index 06ddb1d8b..7afa1252e 100644 --- a/community/leafnode/PKGBUILD +++ b/community/leafnode/PKGBUILD @@ -1,18 +1,17 @@ -# $Id: PKGBUILD 18744 2010-06-14 12:55:42Z spupykin $ +# $Id: PKGBUILD 59410 2011-11-24 15:33:29Z 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=4 pkgdesc="implements a store & forward NNTP proxy (client and server) with IPv4 and IPv6" arch=('i686' 'x86_64' 'mips64el') url="http://leafnode.sourceforge.net/" -depends=(pcre xinetd) +depends=('pcre' 'xinetd') license=('GPL') -install=(leafnode.install) +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 +19,13 @@ 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 + sed -i 's|#define NEWS_USER .*|#define NEWS_USER "news"|' config.h + sed -i 's|#define NEWS_GROUP .*|#define NEWS_GROUP "news"|' config.h + 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..5f8a74c04 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,5 @@ post_install() { } 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 + echo "-- Don't forget to remove /var/spool/news directory" } - |