summaryrefslogtreecommitdiff
path: root/libraries/cryptopp/cryptopp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/cryptopp/cryptopp.SlackBuild')
-rw-r--r--libraries/cryptopp/cryptopp.SlackBuild15
1 files changed, 11 insertions, 4 deletions
diff --git a/libraries/cryptopp/cryptopp.SlackBuild b/libraries/cryptopp/cryptopp.SlackBuild
index 519bc84b4a..5f01e1ca9d 100644
--- a/libraries/cryptopp/cryptopp.SlackBuild
+++ b/libraries/cryptopp/cryptopp.SlackBuild
@@ -16,17 +16,19 @@ 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
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-
cd $TMP
rm -rf $PRGNAM-$VERSION
unzip -a -d $PRGNAM-$VERSION $CWD/${PRGNAM}$(echo $VERSION | tr -d .).zip
@@ -38,12 +40,17 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix Makefile to install correctly on x86_64.
+sed -i -e "s%(PREFIX)/lib%(PREFIX)/lib${LIBDIRSUFFIX}%g" GNUmakefile
+
make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
make install PREFIX=$PKG/usr
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -54,4 +61,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}