summaryrefslogtreecommitdiff
path: root/libraries/perl-cairo/perl-cairo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/perl-cairo/perl-cairo.SlackBuild')
-rw-r--r--libraries/perl-cairo/perl-cairo.SlackBuild27
1 files changed, 17 insertions, 10 deletions
diff --git a/libraries/perl-cairo/perl-cairo.SlackBuild b/libraries/perl-cairo/perl-cairo.SlackBuild
index ee77de109f..3a247121f7 100644
--- a/libraries/perl-cairo/perl-cairo.SlackBuild
+++ b/libraries/perl-cairo/perl-cairo.SlackBuild
@@ -34,26 +34,31 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="ChangeLog LICENSE NEWS README TODO"
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $SRCNAM-$VERSION
-tar -xzvf $CWD/$SRCNAM-$VERSION.tar.gz || exit 1
-cd $SRCNAM-$VERSION || exit 1
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-perl Makefile.PL || exit 1
-make OPTIMIZE="$SLKCFLAGS" || exit 1
-make install INSTALLDIRS=vendor DESTDIR=$PKG || exit 1
+perl Makefile.PL
+make OPTIMIZE="$SLKCFLAGS"
+make install INSTALLDIRS=vendor DESTDIR=$PKG
find $PKG -name $SRCNAM.so -exec strip --strip-unneeded $PKG 2> /dev/null {} \;
@@ -70,7 +75,9 @@ gzip -9 $PKG/usr/man/man3/* 2> /dev/null
find $PKG -depth -type d -empty -exec rm -rf {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ ChangeLog LICENSE NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
@@ -78,4 +85,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}