summaryrefslogtreecommitdiffstats
path: root/kdmtheme
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2006-08-16 18:33:31 +0000
committer Eric Hameleers <alien@slackware.com>2006-08-16 18:33:31 +0000
commitfb862656362adf045220ebeb7966b5b02f6e5c95 (patch)
treed21e7158b1c8fdf3366ad8f8bc8d48ceb2c7b5d9 /kdmtheme
parent3a1725deec6ce0f5affdeebaec6a68be35aa484e (diff)
downloadasb-fb862656362adf045220ebeb7966b5b02f6e5c95.tar.gz
asb-fb862656362adf045220ebeb7966b5b02f6e5c95.tar.xz
Updated for Slackware 11
Diffstat (limited to 'kdmtheme')
-rwxr-xr-xkdmtheme/build/kdmtheme.SlackBuild46
1 files changed, 27 insertions, 19 deletions
diff --git a/kdmtheme/build/kdmtheme.SlackBuild b/kdmtheme/build/kdmtheme.SlackBuild
index cdae21ff..28aa47e0 100755
--- a/kdmtheme/build/kdmtheme.SlackBuild
+++ b/kdmtheme/build/kdmtheme.SlackBuild
@@ -5,7 +5,7 @@
#
# Slackware SlackBuild script
# ===========================
-# By: Eric Hameleers <alien@sox.homeip.net>
+# By: Eric Hameleers <alien@slackware.com>
# For: kdmtheme
# URL: http://smileaf.org/projects/
# Needs:
@@ -45,9 +45,9 @@ SRCURL[0]="http://kde-apps.org/content/download.php?content=22120@DLURL@id=1@DLU
##
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -58,13 +58,20 @@ fi
PKG=$TMP/package-$PRGNAM
-if [ ! -d $TMP/tmp-$PRGNAM ]; then
- mkdir -p $TMP/tmp-$PRGNAM # location to build the source
-fi
if [ ! -d $PKG ]; then
mkdir -p $PKG # place for the package to be built
fi
+if [ ! -d $TMP/tmp-$PRGNAM ]; then
+ mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+elif [ "$1" != "--oldbuild" ]; then
+ # If the "--oldbuild" parameter is present, we keep
+ # the old build files and continue;
+ # By default we remove the remnants of previous build and continue:
+ rm -rf $TMP/tmp-$PRGNAM/*
+fi
+
+
# --- SOURCE FILE AVAILABILITY ---
@@ -75,6 +82,7 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
wget -nv -O ${CWD}/${SOURCE[$i]} "${SRCURL[$i]}"
if [ $? -ne 0 ]; then
echo "Downloading '${SOURCE[$i]}' failed... aborting the build."
+ mv ${CWD}/${SOURCE[$i]} ${CWD}/${SOURCE[$i]}.FAIL
exit 1
fi
else
@@ -159,31 +167,30 @@ cp -a $DOCS \
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
# Move incorrectly installed man pages
-mv $PKG/usr/share/man $PKG/usr/ && rmdir $PKG/usr/share
+[ -d $PKG/usr/share/man ] && mv $PKG/usr/share/man $PKG/usr/ && rmdir $PKG/usr/share
# Compress the man page(s)
-gzip -9f $PKG/usr/man/*/*
-gzip -9f $PKG/usr/man/*/*/*
+find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
# Strip binaries
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded
+2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneed
+ed 2> /dev/null
)
# --- OWNERSHIP, RIGHTS ---
chmod -R o-w $PKG
-chown root:bin $PKG/usr/bin/* $PKG/usr/sbin/* $PKG/bin/* $PKG/sbin/* \
- $PKG/usr/X11R6/bin/* $PKG/opt/kde/bin/* 2>/dev/null
# --- PACKAGE DESCRIPTION ---
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-if [ -f $CWD/slack-requires ]; then
- cat $CWD/slack-requires > $PKG/install/slack-requires
+if [ -f $CWD/slack-required ]; then
+ cat $CWD/slack-required > $PKG/install/slack-required
fi
if [ -f $CWD/doinst.sh ]; then
cat $CWD/doinst.sh > $PKG/install/doinst.sh
@@ -196,10 +203,11 @@ fi
cd $PKG
makepkg --linkadd y --chown n $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz \
2>&1 | tee $CWD/makepkg-${PRGNAM}.log
-(cd $TMP && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5)
-cat $CWD/slack-desc | grep "^${PRGNAM}" > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
-if [ -f $CWD/slack-requires ]; then
- cat $CWD/slack-requires > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep
+(cd $TMP && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}
+.tgz.md5)
+cat $PKG/install//slack-desc | grep "^${PRGNAM}" > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
+if [ -f $PKG/install/slack-required ]; then
+ cat $PKG/install/slack-required > $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep
fi