summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/rrdtool/README1
-rw-r--r--libraries/rrdtool/rrdtool.SlackBuild49
2 files changed, 27 insertions, 23 deletions
diff --git a/libraries/rrdtool/README b/libraries/rrdtool/README
index a5fc6b24d5..d06f163533 100644
--- a/libraries/rrdtool/README
+++ b/libraries/rrdtool/README
@@ -1,4 +1,3 @@
RRDTool is the industry standard data logging and graphing application.
This package makes all bindings that are supported on the system.
-
diff --git a/libraries/rrdtool/rrdtool.SlackBuild b/libraries/rrdtool/rrdtool.SlackBuild
index 3aa5486e48..c2345b688e 100644
--- a/libraries/rrdtool/rrdtool.SlackBuild
+++ b/libraries/rrdtool/rrdtool.SlackBuild
@@ -7,17 +7,23 @@
# Versions >= 1.4.2 maintained by Niels Horn <niels.horn@gmail.com>
# revision date: 2010/03/31
-set -e
-
PRGNAM=rrdtool
VERSION=1.4.3
-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
+
PYTHON=$( python -c 'import sys; print sys.version[:3]' )
-PERL=$( eval "`perl -V:version`"; echo $version )
-CWD=`pwd`
+PERL=$( eval "$(perl -V:version)"; echo $version )
+
+CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -38,13 +44,19 @@ elif [ "$ARCH" = "arm" ]; then
SLKCFLAGS="-O2 -march=armv4t"
LIBDIRSUFFIX=""
ARCHQUADLET="-gnueabi"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $TMP/$PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
@@ -71,30 +83,23 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $(find $PKG/usr/man -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system.
-( cd $PKG
- # Remove 'special' files
- find . -name perllocal.pod \
- -o -name ".packlist" \
- -o -name "*.bs" \
- | xargs rm -f
-)
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
# And remove the directory leftovers
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/perl5/${PERL}
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/perl5/site_perl/${PERL}/$ARCH-linux/auto/RRDp
# Set correct permissions (mostly on the Perl bindings)
-( cd $PKG
- find . -perm 444 -exec chmod 0644 {} \;
- find . -perm 555 -exec chmod 0755 {} \;
-)
+find $PKG -perm 444 -exec chmod 0644 {} \;
+find $PKG -perm 555 -exec chmod 0755 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES CONTRIBUTORS COPYING COPYRIGHT NEWS README THREADS TODO \