aboutsummaryrefslogtreecommitdiff
path: root/network/polipo/polipo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/polipo/polipo.SlackBuild')
-rw-r--r--network/polipo/polipo.SlackBuild23
1 files changed, 18 insertions, 5 deletions
diff --git a/network/polipo/polipo.SlackBuild b/network/polipo/polipo.SlackBuild
index 1f442a5451862..f82e344d61842 100644
--- a/network/polipo/polipo.SlackBuild
+++ b/network/polipo/polipo.SlackBuild
@@ -26,15 +26,27 @@
PRGNAM=polipo
VERSION=${VERSION:-1.0.4}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+
DOCS="CHANGES COPYING INSTALL README"
+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
@@ -44,8 +56,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-# Fix Makefile and add a sample config file
-zcat $CWD/makefile.patch.gz | patch -p1 --verbose
+# Fix Makefile
+cat $CWD/makefile.diff | patch -p1 --verbose
chown -R root:root .
find . \
@@ -54,7 +66,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-make
+make CDEBUGFLAGS="$SLKCFLAGS"
make install DESTDIR=$PKG
( cd $PKG
@@ -84,4 +96,5 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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}
+