summaryrefslogtreecommitdiffstats
path: root/libkipi
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-05-22 19:55:53 +0000
committer Eric Hameleers <alien@slackware.com>2009-05-22 19:55:53 +0000
commit12d45031867fd5bc26a84d2526e53fcf5a518b43 (patch)
tree779b462a5b1e5beaf679249d9659aa8477002ae5 /libkipi
parentc778b8a40eb70777053743261ea6da32e3de6c69 (diff)
downloadasb-12d45031867fd5bc26a84d2526e53fcf5a518b43.tar.gz
asb-12d45031867fd5bc26a84d2526e53fcf5a518b43.tar.xz
Updated for slackware64
Diffstat (limited to 'libkipi')
-rwxr-xr-xlibkipi/build/libkipi.SlackBuild68
1 files changed, 19 insertions, 49 deletions
diff --git a/libkipi/build/libkipi.SlackBuild b/libkipi/build/libkipi.SlackBuild
index 6f4df666..80211d03 100755
--- a/libkipi/build/libkipi.SlackBuild
+++ b/libkipi/build/libkipi.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007-2008 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2007-2009 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,6 +36,8 @@
# * Update for Slackware 12.0
# 0.1.6-1: 08/may/2008 by Eric Hameleers <alien@slackware.com>
# * Update for Slackware 12.1
+# 0.1.6-2: 08/may/2008 by Eric Hameleers <alien@slackware.com>
+# * Make the SlackBuild slackware64-compatible
#
# Run 'sh libkipi.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -75,31 +77,16 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
set -u
P1=${1:-1}
-# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
- MOPT=tune
-else
- MOPT=cpu
-fi
-
case "$ARCH" in
- i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
;;
s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
powerpc) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac
@@ -141,38 +128,28 @@ echo "|| $PRGNAM-$VERSION"
echo "++"
cd $TMP/tmp-$PRGNAM
-
echo "Extracting the source archive(s) for $PRGNAM..."
-if $(file ${SOURCE} | grep -q ": bzip2"); then
- tar -xjvf ${SOURCE}
-elif $(file ${SOURCE} | grep -q ": gzip"); then
- tar -xzvf ${SOURCE}
-fi
+tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
echo Building ...
-LDFLAGS="$SLKLDFLAGS" \
+KDECONFIG=$( which kde4-config 1>/dev/null 2>&1 && echo "kde4-config" || echo "kde-config" )
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=$(kde-config --prefix) \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --program-prefix="" \
- --program-suffix="" \
- --build=$ARCH-slackware-linux \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+./configure \
+ --prefix=$($KDECONFIG --prefix) \
+ --libdir=/usr/lib$($KDECONFIG --libsuffix) \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-# Install all the needed stuff to the package dir
-# Use installwatch if available, to produce a logfile of the installation
-# process that is more easily readable:
-if $(which installwatch > /dev/null 2>&1); then
- installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install
-else
- make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-fi
+make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -181,10 +158,8 @@ cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 644 {} \;
# Strip binaries:
-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 || true
-cd -
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Add a package description:
mkdir -p $PKG/install
@@ -201,8 +176,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
-# Clean up the extra stuff:
-if [ "$P1" = "--cleanup" ]; then
- rm -rf $TMP/tmp-$PRGNAM
- rm -rf $PKG
-fi