libraries/physfs: Fixed a syntax error, script cleanup.

Signed-off-by: Erik Hanson <erik@slackbuilds.org>
This commit is contained in:
Erik Hanson 2010-05-27 10:34:28 -05:00 committed by Robby Workman
parent 4e50b73d4d
commit e57fb3b233

View file

@ -2,7 +2,7 @@
#
# Slackware build script for physfs
#
# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
# Copyright 2009-2010 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,10 +24,9 @@
PRGNAM=physfs
VERSION=2.0.0
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@ -54,17 +53,20 @@ elif [ "$ARCH" = "x86_64" ]; then
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
cd $TMP
rm -rf $PRGNAM-$VERSION
tar zxvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
# LIB_SUFFIX is ignored work around it.
# LIB_SUFFIX is ignored, work around it.
sed -i -e "s|DESTINATION lib|DESTINATION lib${LIBDIRSUFFIX}|g" \
-e "s:-Werror::" \
CMakeLists.txt
@ -79,17 +81,17 @@ cmake \
-DPHYSFS_INTERNAL_ZLIB=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX:STRING=${LIBDIRSUFFIX} || exit 1
-DLIB_SUFFIX:STRING=${LIBDIRSUFFIX}
make || exit 1
make install DESTDIR=$PKG || exit 1
make
make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.txt CREDITS.txt INSTALL.txt LICENSE.txt TODO.txt \
lzma/LZMA-LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install