aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-23 08:58:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-23 09:49:38 +0000
commit52b1fb5af93e3781ff3a719e034fbe15e28162c5 (patch)
tree147f9f86cd599ab5684e0614daed1b00b56989e0
parentb2ea3ed7c0c039507b9f13d9330abfb08ba5b00d (diff)
downloadaports-52b1fb5af93e3781ff3a719e034fbe15e28162c5.tar.bz2
aports-52b1fb5af93e3781ff3a719e034fbe15e28162c5.tar.xz
main/ntop: rebuild against gdbm-1.10 and set dir permissions properly
We should always set permissions within the apk and not in post-install since apk-tools keeps track of permissions.
-rw-r--r--main/ntop/APKBUILD8
-rwxr-xr-xmain/ntop/ntop.post-install3
-rwxr-xr-xmain/ntop/ntop.pre-install4
3 files changed, 9 insertions, 6 deletions
diff --git a/main/ntop/APKBUILD b/main/ntop/APKBUILD
index 44ac5b65f4..4d260d442f 100644
--- a/main/ntop/APKBUILD
+++ b/main/ntop/APKBUILD
@@ -2,16 +2,18 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ntop
pkgver=4.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Network traffic probe"
url="http://www.ntop.org"
arch="all"
license="GPL"
depends=
+pkgusers="ntop"
+pkggroups="ntop"
makedepends="autoconf automake freetype-dev gdbm-dev geoip-dev libart-lgpl-dev
libevent-dev libpcap-dev libpng-dev libtool libxml2-dev lua-dev
openssl-dev python-dev rrdtool-dev wget zlib-dev"
-install="$pkgname.post-install"
+install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc"
source="http://sourceforge.net/projects/$pkgname/files/$pkgname/Stable/$pkgname-$pkgver.tar.gz
ntop.initd
@@ -46,7 +48,7 @@ package() {
install -m755 -D "$srcdir"/ntop-update-geoip-db \
"$pkgdir"/usr/bin/ntop-update-geoip-db
# ntop internal db dir
- mkdir -p $pkgdir/var/lib/ntop
+ install -d -o ntop -g ntop -m755 $pkgdir/var/lib/ntop
}
md5sums="116df99cf548431393991ea15443c52f ntop-4.1.0.tar.gz
diff --git a/main/ntop/ntop.post-install b/main/ntop/ntop.post-install
deleted file mode 100755
index ede8a22f3c..0000000000
--- a/main/ntop/ntop.post-install
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-adduser -h /var/lib/ntop -s /bin/false -S -H -D ntop &>/dev/null
-chown ntop /var/lib/ntop
diff --git a/main/ntop/ntop.pre-install b/main/ntop/ntop.pre-install
new file mode 100755
index 0000000000..fdc2803450
--- /dev/null
+++ b/main/ntop/ntop.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+addgroup -S ntop 2>/dev/null
+adduser -h /var/lib/ntop -s /bin/false -S -G ntop -H -D ntop 2>/dev/null
+exit 0