summaryrefslogtreecommitdiff
path: root/system/netatop/netatop.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/netatop/netatop.SlackBuild')
-rw-r--r--system/netatop/netatop.SlackBuild9
1 files changed, 6 insertions, 3 deletions
diff --git a/system/netatop/netatop.SlackBuild b/system/netatop/netatop.SlackBuild
index 62ff00e360..4553bd29a2 100644
--- a/system/netatop/netatop.SlackBuild
+++ b/system/netatop/netatop.SlackBuild
@@ -27,6 +27,9 @@ VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+KERNEL=${KERNEL:-$(uname -r)}
+PKGVER=${VERSION}_$(echo $KERNEL | tr - _)
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -74,12 +77,12 @@ make
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/lib/modules/`uname -r`/extra
+mkdir -p $PKG/lib/modules/$KERNEL/extra
mkdir -p $PKG/usr/sbin
mkdir -p $PKG/etc/rc.d/
mkdir -p $PKG/usr/man/man{4,8}
-install -m 0744 module/netatop.ko $PKG/lib/modules/`uname -r`/extra
+install -m 0744 module/netatop.ko $PKG/lib/modules/$KERNEL/extra
install -m 0755 daemon/netatopd $PKG/usr/sbin/
install -m 0644 netatop.init $PKG/etc/rc.d/rc.netatopd.new
cp man/netatop.4 $PKG/usr/man/man4/
@@ -97,4 +100,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}