aboutsummaryrefslogtreecommitdiff
path: root/libraries/libixp/libixp.SlackBuild
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-13 00:30:58 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:30:58 +0200
commitfd023843e552693495120c057547e689e642bc5f (patch)
tree8e2837f782730e835ff43df622a156d444e31510 /libraries/libixp/libixp.SlackBuild
parent2ec9354ad221020bb5e2aa4ba4b70c3e9b113424 (diff)
libraries/libixp: Updated for version 0.4
Diffstat (limited to 'libraries/libixp/libixp.SlackBuild')
-rw-r--r--libraries/libixp/libixp.SlackBuild51
1 files changed, 28 insertions, 23 deletions
diff --git a/libraries/libixp/libixp.SlackBuild b/libraries/libixp/libixp.SlackBuild
index 5085cb154e1ff..115a481ed8ff7 100644
--- a/libraries/libixp/libixp.SlackBuild
+++ b/libraries/libixp/libixp.SlackBuild
@@ -34,10 +34,13 @@ 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"
fi
set -e
@@ -46,7 +49,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -55,29 +58,32 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix prefixes and cflags values
-sed -i \
- -e 's:^PREFIX = /usr/local:PREFIX = /usr:' \
- -e 's:^MAN = ${PREFIX}/share/man:MAN = /usr/man:' \
- -e 's:^ETC = ${PREFIX}/etc:ETC = /etc:' \
- -e 's:^CFLAGS =:CFLAGS += :' \
- config.mk
-CFLAGS="$SLKCFLAGS" make
-
-# This is *needed* to install correctly under $PKG
-sed -i \
- -e 's:^PREFIX = /usr:PREFIX = '${PKG}'/usr:' \
- -e 's:^MAN = /usr/man:MAN = '${PKG}'/usr/man:' \
- -e 's:^ETC = /etc:ETC = '${PKG}'/etc:' \
- config.mk
-make install
+# Fix cflags value
+sed -i 's:^CFLAGS =:CFLAGS += :' config.mk
+
+CFLAGS="$SLKCFLAGS" make \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ MAN=/usr/man \
+ ETC=/etc
+
+# Fix hardcoded /usr/lib
+sed "s%@baselibdir@%lib$LIBDIRSUFFIX%g" $CWD/libixp-0.4-libdir.diff | patch -p1
+
+make install \
+ PREFIX=$PKG/usr \
+ LIBDIR=$PKG/usr/lib${LIBDIRSUFFIX} \
+ MAN=$PKG/usr/man \
+ ETC=$PKG/etc
# Erase "/etc", it's empty
rmdir $PKG/etc
-(
- find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
( cd $PKG/usr/man
@@ -86,12 +92,11 @@ rmdir $PKG/etc
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cd libixp
-cp -a LICENSE LICENSE.p9p README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a libixp/LICENSE* libixp/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
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}