summaryrefslogtreecommitdiff
path: root/graphics/digikam/digikam.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/digikam/digikam.SlackBuild')
-rw-r--r--graphics/digikam/digikam.SlackBuild55
1 files changed, 32 insertions, 23 deletions
diff --git a/graphics/digikam/digikam.SlackBuild b/graphics/digikam/digikam.SlackBuild
index 7dc54264a4..26b8314109 100644
--- a/graphics/digikam/digikam.SlackBuild
+++ b/graphics/digikam/digikam.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for digiKam
-# Copyright 2007 MagicMan <MagicMan07@bluebottle.com>
+# Copyright 2007-2008 Frank Caraballo <fecaraballo{at}gmail{dot}com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,24 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by the SlackBuilds.org project
-
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root!"
- exit 1
-fi
-
PRGNAM=digikam
-VERSION=0.9.1
+VERSION=0.9.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-PDOCS="AUTHORS ChangeLog COPYING HACKING INSTALL NEWS README RELEASE.rev TODO"
+DOCS="AUTHORS ChangeLog COPYING HACKING INSTALL NEWS README RELEASE.rev TODO"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -47,39 +41,54 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.* || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+KDEPREF=$(kde-config --prefix)
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/opt/kde \
+ --prefix=$KDEPREF \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/opt/kde/man \
- || exit 1
+ --mandir=$KDEPREF/man \
+ --program-prefix="" \
+ --program-suffix="" \
+ --disable-debug \
+ --enable-shared=yes \
+ --enable-static=no
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make
+make install-strip DESTDIR=$PKG
-( cd $PKG/opt/kde/man
+( cd $PKG/$KDEPREF/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $PDOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
-# Remove empty doc directory structure:
-rm -rf $PKG/opt/kde/share/doc
+( cd $PKG
+find . -type d -depth -exec rmdir {} \; 2>/dev/null
+find . -type f -size 0c -exec rm {} \; 2>/dev/null
+)
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh