summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-09-09 20:54:39 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-21 19:48:32 -0300
commitfa05f0e55dffa139653b6b30af31aa6385a63cd5 (patch)
tree573d271cfb240672d80930200ffd1057a8ffdb19
parent5925bf810bb1011180c1831321ee5713bd0af20e (diff)
downloadslackbuilds-fa05f0e55dffa139653b6b30af31aa6385a63cd5.tar.gz
perl/perl-File-Slurp: Build clean up, removed ref. to old perl.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r--perl/perl-File-Slurp/perl-File-Slurp.SlackBuild54
1 files changed, 31 insertions, 23 deletions
diff --git a/perl/perl-File-Slurp/perl-File-Slurp.SlackBuild b/perl/perl-File-Slurp/perl-File-Slurp.SlackBuild
index d23efef2d9..d40d9ee52a 100644
--- a/perl/perl-File-Slurp/perl-File-Slurp.SlackBuild
+++ b/perl/perl-File-Slurp/perl-File-Slurp.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-
+
# Slackware build script for perl-File-Slurp
# Copyright 2008 David Somero <dsomero@hotmail.com> Athens,TN USA
@@ -23,17 +23,16 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=perl-File-Slurp
-SRCNAM=File-Slurp
VERSION=9999.13
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
+SRCNAM=File-Slurp
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -49,32 +48,41 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
+cd $TMP
rm -rf $SRCNAM-$VERSION
tar -xzvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
-
-perl Makefile.PL
-make
-make install INSTALLDIRS=vendor INSTALLVENDORMAN3DIR=/usr/man/man3 DESTDIR=$PKG
-gzip -9 $PKG/usr/man/man3/* 2> /dev/null
-
-# Remove perlocal.pod and .packlist and .bs files from $PKG
-( for i in perllocal.pod .packlist .bs; do
- find $PKG -name "$i" -exec rm -rf {} \;
- done
-)
-# Remove empty directory hierarchy
-rmdir --parents \
- $PKG/usr/lib/perl5/vendor_perl/5.10.0/i486-linux-thread-multi/auto/File/Slurp/ \
- $PKG/usr/lib/perl5/5.10.0/i486-linux-thread-multi 2> /dev/null || true
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+perl Makefile.PL \
+ PREFIX=/usr \
+ INSTALLDIRS=vendor \
+ INSTALLVENDORMAN3DIR=/usr/man/man3
+make
+make test
+make install DESTDIR=$PKG
+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
+
+# Compress man pages
+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
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc