diff options
Diffstat (limited to 'network/nagios/nagios.SlackBuild')
-rw-r--r-- | network/nagios/nagios.SlackBuild | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/network/nagios/nagios.SlackBuild b/network/nagios/nagios.SlackBuild index 6812144ed1..48a72e7029 100644 --- a/network/nagios/nagios.SlackBuild +++ b/network/nagios/nagios.SlackBuild @@ -3,11 +3,30 @@ # Slackware build script for nagios: # IT infrastructure monitoring system -# Written by Niels Horn <niels.horn@gmail.com> -# revision date 2010/10/06 +# Copyright 2009-2011 Niels Horn, Rio de Janeiro, RJ, Brazil +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# revision date 2011/07/26 PRGNAM=nagios -VERSION=${VERSION:-3.2.3} +VERSION=${VERSION:-3.3.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -64,14 +83,18 @@ if [ "$(grep ^nagios /etc/passwd)" = "" -o "$(grep ^nagios /etc/group)" = "" ] ; exit 1 fi -rm -rf $TMP/$PRGNAM-$VERSION $PKG +rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP +rm -rf $PRGNAM tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +cd $PRGNAM chown -R root:root . chmod -R u+w,go+r-w,a-s . +#Solve a silly bug in the Makefile +patch -p1 < $CWD/nagios_makeinstall.patch + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -91,13 +114,25 @@ CFLAGS="$SLKCFLAGS" \ make all export DESTDIR=$PKG +echo "*** make install ***" make install +echo "*** make install-init ***" make install-init +echo "*** make install-commandmode ***" make install-commandmode +echo "*** make install-config ***" make install-config # Need to create the $PKG/etc/httpd/extra directory (this is a bug in Makefile.in) mkdir -p $PKG/etc/httpd/extra +echo "*** make install-webconf ***" make install-webconf +# Following upstream, the "exfoliation" theme is now the default... +echo "*** make install-exfoliation ***" +make install-exfoliation +# ...but, if you prefer the "classic" theme, uncomment the next two lines, as they +# will overwrite the new theme: +#echo "*** make install-classicui ***" +#make install-classicui find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -121,16 +156,11 @@ cp -a \ Changelog INSTALLING LEGAL LICENSE README THANKS UPGRADING contrib \ $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/$DOCROOT/$PRGNAM/docs $PKG/usr/doc/$PRGNAM-$VERSION/html -cd $PKG/$DOCROOT/$PRGNAM - ln -sf ../$RELPATH/usr/doc/$PRGNAM-$VERSION/html docs -cd - 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 # Fixup some ownership and permission issues -chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION/html -chmod 0755 $PKG/usr/doc/$PRGNAM-$VERSION/html{,/images} chown root:root $PKG/usr/sbin chown -R root:nagios $PKG/usr/sbin/$PRGNAM chmod -R 0754 $PKG/usr/sbin/$PRGNAM |