aboutsummaryrefslogtreecommitdiff
path: root/perl/perl-MailTools/perl-MailTools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-MailTools/perl-MailTools.SlackBuild')
-rw-r--r--perl/perl-MailTools/perl-MailTools.SlackBuild35
1 files changed, 19 insertions, 16 deletions
diff --git a/perl/perl-MailTools/perl-MailTools.SlackBuild b/perl/perl-MailTools/perl-MailTools.SlackBuild
index c3eada4eea272..36f480e8a0836 100644
--- a/perl/perl-MailTools/perl-MailTools.SlackBuild
+++ b/perl/perl-MailTools/perl-MailTools.SlackBuild
@@ -3,7 +3,7 @@
# Slackware Package Build Script for perl modules: MailTools
# Home Page http://search.cpan.org/dist/MailTools/
-# Copyright (c) 2008-2010, Nishant Limbachia, Hoffman Estates, IL, USA
+# Copyright (c) 2008-2011, Nishant Limbachia, Hoffman Estates, IL, USA
# <nishant _AT_ mnspace _DOT_ net>
# All rights reserved.
@@ -27,18 +27,17 @@
#
# Modified by the SlackBuilds.org project.
-SRCNAM=MailTools
-PRGNAM=perl-$SRCNAM
-VERSION=${VERSION:-2.07}
+PRGNAM=perl-MailTools
+VERSION=${VERSION:-2.08}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
+SRCNAM=$(echo $PRGNAM | cut -f2 -d-)
+
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
@@ -50,6 +49,16 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
DOCS="ChangeLog README"
rm -fr $TMP/$SRCNAM-$VERSION $PKG
@@ -71,23 +80,17 @@ perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLVENDORMAN3DIR=/usr/man/ma
make
make install DESTDIR=$PKG
-### putting essential docs
+# putting essential docs
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
-# Remove perlocal.pod and .packlist from $PKG
-( cd $PKG
- 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
-# Remove empty directories
find $PKG -depth -type d -empty -exec rm -rf {} \;
-( 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
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc