mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
libraries/rrdtool: Miscellaneous script cleanup.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
63bcc5c4ef
commit
486f2f4987
2 changed files with 27 additions and 23 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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 \
|
||||
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 \
|
||||
|
|
Loading…
Reference in a new issue