2010-06-23 23:07:40 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Slackware build script for exact-image
|
2013-11-03 21:25:44 +01:00
|
|
|
# Written by Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
|
2010-06-23 23:07:40 +02:00
|
|
|
|
|
|
|
PRGNAM=exact-image
|
2015-08-04 16:26:47 +02:00
|
|
|
VERSION=${VERSION:-0.9.1}
|
2012-09-25 04:05:14 +02:00
|
|
|
BUILD=${BUILD:-3}
|
2010-06-23 23:07:40 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
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"
|
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2013-11-22 08:37:19 +01:00
|
|
|
find -L . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
2010-06-23 23:07:40 +02:00
|
|
|
-exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \;
|
|
|
|
|
2015-08-04 16:26:47 +02:00
|
|
|
# Patch to fix build with libpng16 (-current) (thanks to Debian)
|
|
|
|
patch -p1 --verbose < $CWD/exact-image-libpng15.patch
|
|
|
|
|
|
|
|
# Patch to fix build with giflib-5.1 (-current) (thanks to PLD Linux)
|
|
|
|
patch -p1 --verbose < $CWD/exact-image-giflib.patch
|
2010-06-23 23:07:40 +02:00
|
|
|
|
2010-10-20 08:24:18 +02:00
|
|
|
# Patch to fix perl path
|
2010-06-23 23:07:40 +02:00
|
|
|
eval $(perl -V:vendorlib)
|
2010-10-25 13:49:24 +02:00
|
|
|
sed "s,@vendorlib@,$vendorlib,g" $CWD/fixup-perl_paths.diff | patch -p1 --verbose
|
2010-06-23 23:07:40 +02:00
|
|
|
|
|
|
|
./configure \
|
|
|
|
--bindir=/usr/bin \
|
2012-09-10 05:20:38 +02:00
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
--without-php
|
2010-06-23 23:07:40 +02:00
|
|
|
|
|
|
|
make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
|
|
|
|
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 LICENSE README TODO CODING examples $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.${PKGTYPE:-tgz}
|