summaryrefslogtreecommitdiff
path: root/libraries/libmpcdec/libmpcdec.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libmpcdec/libmpcdec.SlackBuild')
-rw-r--r--libraries/libmpcdec/libmpcdec.SlackBuild17
1 files changed, 12 insertions, 5 deletions
diff --git a/libraries/libmpcdec/libmpcdec.SlackBuild b/libraries/libmpcdec/libmpcdec.SlackBuild
index 905d0755e0..d981696152 100644
--- a/libraries/libmpcdec/libmpcdec.SlackBuild
+++ b/libraries/libmpcdec/libmpcdec.SlackBuild
@@ -28,6 +28,7 @@ VERSION=1.2.6
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -35,8 +36,13 @@ OUTPUT=${OUTPUT:-/tmp}
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
@@ -53,10 +59,11 @@ chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static
make
make install-strip DESTDIR=$PKG
@@ -69,4 +76,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}