diff options
author | Erik Hanson <erik@slackbuilds.org> | 2010-05-11 14:56:24 +0200 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-05-11 14:56:24 +0200 |
commit | 83514f69f5964ba80311e60e7b78d1ed1c9dc6d1 (patch) | |
tree | a70c44da07a3a13475a475247d69256b68cf9712 /libraries/physfs/physfs.SlackBuild | |
parent | 0d0055fa2f4c144440e09a2a32f707c0786bdfec (diff) | |
download | slackbuilds-83514f69f5964ba80311e60e7b78d1ed1c9dc6d1.tar.gz |
libraries/physfs: Initial import
Diffstat (limited to 'libraries/physfs/physfs.SlackBuild')
-rw-r--r-- | libraries/physfs/physfs.SlackBuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/libraries/physfs/physfs.SlackBuild b/libraries/physfs/physfs.SlackBuild new file mode 100644 index 0000000000..890fa95fb3 --- /dev/null +++ b/libraries/physfs/physfs.SlackBuild @@ -0,0 +1,54 @@ +#!/bin/sh + +# Slackware build script for physfs +# Written by Erik Hanson erik@slackbuilds.org + +PRGNAM=physfs +VERSION=1.0.1 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=`pwd` +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP || exit 1 +rm -rf $PRGNAM-$VERSION +tar zxvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + || exit 1 + +make || exit 1 +make install DESTDIR=$PKG || exit 1 + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + 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 +cp -a CHANGELOG CREDITS LICENSE TODO docs/README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 |