diff options
Diffstat (limited to 'libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild')
-rwxr-xr-x | libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild b/libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild index 908d345843..96b0ce437b 100755 --- a/libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild +++ b/libraries/perl-Archive-Zip/perl-Archive-Zip.SlackBuild @@ -24,12 +24,21 @@ PRGNAM=perl-Archive-Zip VERSION=1.31_01 -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} SRC_PRGNAM=Archive-Zip +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -46,6 +55,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -69,17 +81,10 @@ make test make install DESTDIR=$PKG mv $PKG/usr/share/man $PKG/usr/ +find $PKG/usr/man -type f -exec gzip -9 {} \; -( 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 -) - -# Remove perllocal.pod and other special files that don't need to be installed -( cd $PKG - find . -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f - find . -depth -type d -empty -delete -) +find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f +find $PKG -depth -type d -empty -delete mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION |