diff options
Diffstat (limited to 'network/nagios/nagios.SlackBuild')
-rw-r--r-- | network/nagios/nagios.SlackBuild | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/network/nagios/nagios.SlackBuild b/network/nagios/nagios.SlackBuild index 66834c497e05..1a607c99dba8 100644 --- a/network/nagios/nagios.SlackBuild +++ b/network/nagios/nagios.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for nagios # Copyright 2009-2013 Niels Horn, Rio de Janeiro, RJ, Brazil -# Copyright 2014, 2015, 2016, 2017 Mario Preksavec, Zagreb, Croatia +# Copyright 2014, 2021 Mario Preksavec, Zagreb, Croatia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nagios -VERSION=${VERSION:-4.3.4} +VERSION=${VERSION:-4.4.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -115,6 +115,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix /var/run usage +patch -p1 <$CWD/default-init.in.diff + CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \ ./configure \ --prefix=/usr \ @@ -129,6 +132,7 @@ CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \ --with-httpd-conf=/etc/httpd/extra \ --with-checkresult-dir=/var/spool/$PRGNAM \ --with-init-dir=/etc/rc.d \ + --with-init-type=sysv \ --with-lockfile=/var/run/nagios/nagios.lock make all @@ -171,25 +175,29 @@ chmod -R g-w,o-rx $PKG/etc/$PRGNAM mkdir -p $PKG/var/run/nagios # Change init script and leave it -x +mv $PKG/etc/init.d $PKG/etc/rc.d mv $PKG/etc/rc.d/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new chmod -x $PKG/etc/rc.d/rc.$PRGNAM.new # Move documentation to right location mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - Changelog INSTALLING LEGAL LICENSE README THANKS UPGRADING contrib \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CONTRIBUTING.md Changelog INSTALLING LEGAL LICENSE README.md \ + THANKS UPGRADING contrib $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/$DOCROOT/$PRGNAM/docs $PKG/usr/doc/$PRGNAM-$VERSION/html find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE +# Move cgi files to their place +mkdir -p $PKG/usr/sbin/$PRGNAM +mv $PKG/usr/sbin/*.cgi $PKG/usr/sbin/$PRGNAM/ + # Fixup some ownership and permission issues chown root:root $PKG/usr/sbin chown -R root:nagios $PKG/usr/sbin/$PRGNAM chmod -R 0754 $PKG/usr/sbin/$PRGNAM chown root:root $PKG/usr/bin -chmod 0755 $PKG/usr/bin +chmod 0755 $PKG/usr/{,s}bin chown root:nagios $PKG/usr/bin/* chmod 0754 $PKG/usr/bin/* chown nagios:nagios $PKG/var/run/$PRGNAM |