diff options
author | Niels Horn <niels.horn@gmail.com> | 2010-07-11 10:06:29 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-07-11 10:28:11 -0500 |
commit | 8077c7346f334057721f3ec7dfdc9c75e47a0f41 (patch) | |
tree | 47829483ae336092f0b1390ae810186650070db4 /network | |
parent | 03daf0605a90e78f1568ebb4a97d971e2a11a727 (diff) | |
download | slackbuilds-8077c7346f334057721f3ec7dfdc9c75e47a0f41.tar.gz |
network/nagios: Fix symlinks when using an alternative root.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r-- | network/nagios/nagios.SlackBuild | 27 | ||||
-rw-r--r-- | network/nagios/nagios.info | 2 |
2 files changed, 24 insertions, 5 deletions
diff --git a/network/nagios/nagios.SlackBuild b/network/nagios/nagios.SlackBuild index f8e55326be..7e3e73c261 100644 --- a/network/nagios/nagios.SlackBuild +++ b/network/nagios/nagios.SlackBuild @@ -4,16 +4,29 @@ # IT infrastructure monitoring system # Written by Niels Horn - niels.horn@gmail.com -# revision date 2010/03/11 +# revision date 2010/07/10 PRGNAM=nagios VERSION=${VERSION:-3.2.1} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + DOCROOT=${DOCROOT:-/var/www/htdocs} +# To create valid symlinks, we need a relative path from DOCROOT +RELPATH="" +for i in $(echo $DOCROOT | tr "/" " "); do + RELPATH="${RELPATH}../" +done + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -35,6 +48,10 @@ elif [ "$ARCH" = "arm" ]; then SLKCFLAGS="-O2 -march=armv4t" LIBDIRSUFFIX="" ARCHQUADLET="-gnueabi" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + ARCHQUADLET="" fi set -e @@ -102,7 +119,9 @@ 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 -s /usr/doc/$PRGNAM-$VERSION/html docs ) +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 diff --git a/network/nagios/nagios.info b/network/nagios/nagios.info index 05085771b6..08c9299fe7 100644 --- a/network/nagios/nagios.info +++ b/network/nagios/nagios.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Niels Horn" EMAIL="niels.horn@gmail.com" -APPROVED="Erik Hanson" +APPROVED="dsomero" |