diff options
author | Brenton Earl <brent@exitstatusone.com> | 2016-12-29 21:29:49 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2016-12-30 23:30:13 +0000 |
commit | 9e97654de5236540991d935511f475dc44859a88 (patch) | |
tree | dbe7107d86f43edd871dfca0c03c34167e19cf11 /perl | |
parent | 5aa44ca455ace74d828ded92906e1a3e2259041d (diff) |
perl/perl-tree-dagnode: Switch to i586, cleanup SlackBuild.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'perl')
-rw-r--r-- | perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild b/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild index a02e81f748bb7..75346df6a676e 100644 --- a/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild +++ b/perl/perl-tree-dagnode/perl-tree-dagnode.SlackBuild @@ -32,7 +32,7 @@ SRCNAM=Tree-DAG_Node if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,7 +43,21 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -set -eu +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -53,10 +67,10 @@ tar xvf $CWD/$SRCNAM-$VERSION.tgz cd $SRCNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; perl Makefile.PL \ PREFIX=/usr \ @@ -66,16 +80,14 @@ make make test make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true 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 find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true -# Remove empty directories find $PKG -depth -type d -empty -delete || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |