|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2009 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2009,2011 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -26,14 +26,14 @@
|
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-cryptopp} |
|
|
|
|
VERSION=${VERSION:-5.6.0} |
|
|
|
|
VERSION=${VERSION:-5.6.1} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC${VERSION//./}.zip} |
|
|
|
|
WGET=${WGET:-http://downloads.sourceforge.net/cryptopp/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-cryptopp} |
|
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
|
ARCH=${ARCH:-i486} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^.86$/i486/;s/^arm.*/arm/')} |
|
|
|
|
JOBS=${JOBS:-1} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
|
|
|
|
|
@ -62,6 +62,11 @@ if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
|
|
|
|
|
LIBDIRSUFFIX= |
|
|
|
|
if [ "x$ARCH" = xx86_64 ]; then |
|
|
|
|
LIBDIRSUFFIX=64 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
|
mkdir $TMP/$NAMESRC |
|
|
|
|
cd $TMP/$NAMESRC |
|
|
|
@ -71,15 +76,13 @@ if [ "x$ARCH" = xx86_64 ]; then
|
|
|
|
|
sed -i 's/^# CXXFLAGS += -fPIC/CXXFLAGS += -fPIC/' GNUmakefile |
|
|
|
|
fi |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install PREFIX=/$PKG/usr |
|
|
|
|
make -j $JOBS libcryptopp.so |
|
|
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
|
strip --strip-unneeded $PKG/usr/bin/cryptest.exe $PKG/usr/lib/libcryptopp.a |
|
|
|
|
|
|
|
|
|
mv $PKG/usr/bin/cryptest.exe $PKG/usr/bin/cryptest |
|
|
|
|
if [ "x$ARCH" = xx86_64 ]; then |
|
|
|
|
mv $PKG/usr/lib $PKG/usr/lib64 |
|
|
|
|
fi |
|
|
|
|
# Install |
|
|
|
|
mkdir -p $PKG/usr/bin $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/include/cryptopp |
|
|
|
|
install -m 755 -s cryptest.exe $PKG/usr/bin/cryptest |
|
|
|
|
install -m 755 -s libcryptopp.so $PKG/usr/lib$LIBDIRSUFFIX/libcryptopp.so |
|
|
|
|
install -m 644 *.h $PKG/usr/include/cryptopp/ |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAMESRC-$VERSION |
|
|
|
|