libraries/db46: Miscellaneous build script cleanups.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
dsomero 2011-04-12 14:16:39 -04:00 committed by Heinz Wiesinger
parent 6c606067b0
commit 030c314155
2 changed files with 24 additions and 24 deletions

View file

@ -26,15 +26,13 @@
PRGNAM=db46
VERSION=4.6.21
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -42,14 +40,13 @@ fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@ -59,9 +56,13 @@ else
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf db-$VERSION
tar xzvf $CWD/db-$VERSION.tar.gz || exit 1
tar xvf $CWD/db-$VERSION.tar.gz
cd db-$VERSION
chown -R root:root .
find . \
@ -76,7 +77,6 @@ patch -p0 < $CWD/patches/patch.4.6.21.2
patch -p0 < $CWD/patches/patch.4.6.21.3
patch -p0 < $CWD/patches/patch.4.6.21.4
rm -rf build-dir
mkdir build-dir
cd build-dir
CFLAGS="$SLKCFLAGS" \
@ -89,9 +89,9 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-cxx \
--enable-compat185 \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@ -100,7 +100,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
rm -rf $PKG/usr/docs
mkdir -p $PKG/usr/doc/db-$VERSION
cp -a \
../LICENSE ../README \
LICENSE README \
$PKG/usr/doc/db-$VERSION
cat << EOF > $PKG/usr/doc/db-$VERSION/README-DOCS

View file

@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="John Clizbe"
EMAIL="John.Clizbe@gmail.com"
APPROVED="rworkman"
APPROVED="dsomero rworkman"