summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibkdcraw/build/libkdcraw.SlackBuild69
1 files changed, 23 insertions, 46 deletions
diff --git a/libkdcraw/build/libkdcraw.SlackBuild b/libkdcraw/build/libkdcraw.SlackBuild
index 6e2a1917..518b0bf9 100755
--- a/libkdcraw/build/libkdcraw.SlackBuild
+++ b/libkdcraw/build/libkdcraw.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
@@ -39,8 +39,10 @@
# digikam-0.9.3 will not compile against that version...
# 0.1.4-1: 28/jul/2008 by Eric Hameleers <alien@slackware.com>
# * Update needed by digikam 0.9.4
+# 0.1.8-1: 22/may/2009 by Eric Hameleers <alien@slackware.com>
+# * Update
#
-# Run 'sh libkdcraw.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh libkdcraw.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -49,15 +51,13 @@
# Set initial variables:
PRGNAM=libkdcraw
-VERSION=${VERSION:-0.1.4}
+VERSION=${VERSION:-0.1.8}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS PACKAGING README RELEASE.rev"
-KDEPREF=$(kde-config --prefix)
-
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -66,7 +66,6 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Input URL: http://dl.sourceforge.net/kipi/libkdcraw-0.1.1.tar.bz2
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2"
SRCURL="http://downloads.sourceforge.net/kipi/${PRGNAM}-${VERSION}.tar.bz2"
@@ -81,15 +80,8 @@ 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
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
s390) SLKCFLAGS="-O2"
@@ -145,38 +137,30 @@ 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 ...
+KDECONFIG=$( which kde4-config 1>/dev/null 2>&1 && echo "kde4-config" || echo "kde-config" )
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=${KDEPREF} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/doc \
- --without-arts \
- --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 \
+ --mandir=/usr/doc \
+ --without-arts \
+ --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
# Create symlink to the binary program kdcraw:
mkdir -p $PKG/usr/bin
@@ -197,10 +181,8 @@ if [ -d $PKG/usr/man ]; then
fi
# 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
@@ -223,8 +205,3 @@ if [ -f $PKG/install/slack-required ]; then
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
fi
-# Clean up the extra stuff:
-if [ "$P1" = "--cleanup" ]; then
- rm -rf $TMP/tmp-$PRGNAM
- rm -rf $PKG
-fi