diff options
author | Eric Hameleers <alien@slackware.com> | 2007-11-04 16:28:07 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2007-11-04 16:28:07 +0000 |
commit | ea82f213a1915e94ed005c70247f22e0b5fa8f57 (patch) | |
tree | d953541d76eb44b1b801a1e2899ebd74e3cdc9d2 /kdmtheme | |
parent | f36b5e9518b398986a31c220a5b75155f0db54ec (diff) | |
download | asb-ea82f213a1915e94ed005c70247f22e0b5fa8f57.tar.gz asb-ea82f213a1915e94ed005c70247f22e0b5fa8f57.tar.xz |
Update
Diffstat (limited to 'kdmtheme')
-rwxr-xr-x | kdmtheme/build/kdmtheme.SlackBuild | 71 |
1 files changed, 20 insertions, 51 deletions
diff --git a/kdmtheme/build/kdmtheme.SlackBuild b/kdmtheme/build/kdmtheme.SlackBuild index da25cea7..d8a70050 100755 --- a/kdmtheme/build/kdmtheme.SlackBuild +++ b/kdmtheme/build/kdmtheme.SlackBuild @@ -36,6 +36,8 @@ # * Update # 1.1.2-2: 27/Mar/2007 by Eric Hameleers <alien@slackware.com> # * Polished the SlackBuild script. +# 1.2.1-1: 04/nov/2007 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh kdmtheme.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -43,15 +45,15 @@ # # ----------------------------------------------------------------------------- -# --- INIT --- # Set initial variables: PRGNAM=kdmtheme -VERSION=${VERSION:-1.1.2} +VERSION=${VERSION:-1.2.1} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} -DOCS="AUTHORS BUGS ChangeLog COPYING CREDITS FAQ LICENSE MAINTAINERS NEWS README* TODO" +DOCS="AUTHORS BUGS ChangeLog COPYING CREDITS FAQ LICENSE MAINTAINERS \ + NEWS README* TODO" # Where do we look for sources? CWD=`pwd` @@ -106,28 +108,14 @@ case "$ARCH" in ;; esac -if [ ! -d $TMP/tmp-$PRGNAM ]; then - mkdir -p $TMP/tmp-$PRGNAM # location to build the source -elif [ "$P1" != "--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 - -if [ ! -d $PKG ]; then - mkdir -p $PKG # place for the package to be built -else - rm -rf $PKG/* # We always erase old package's contents: -fi - -if [ ! -d $OUTPUT ]; then - mkdir -p $OUTPUT # place for the package to be saved -fi - - -# --- SOURCE FILE AVAILABILITY --- +# Create clean working directories: +mkdir -p $TMP/tmp-$PRGNAM # location to build the source +rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # We always erase old package's contents: +mkdir -p $OUTPUT # place for the package to be saved +# Source files: if ! [ -f ${SOURCE} ]; then if ! [ "x${SRCURL}" == "x" ]; then # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT @@ -135,7 +123,7 @@ if ! [ -f ${SOURCE} ]; then echo "Source '`basename ${SOURCE}`' not available yet..." echo "Will download file to `dirname $SOURCE`" wget -nv -O "${SOURCE}" "${SRCURL}" || true - if [ $? -ne 0 ]; then + if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '`basename ${SOURCE}`' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 @@ -164,36 +152,30 @@ if `file ${SOURCE} | grep -q ": bzip2"`; then elif `file ${SOURCE} | grep -q ": gzip"`; then tar -xzvf ${SOURCE} fi -chown -R root:root * -chmod -R u+w,go+r-w,a-s * cd ${PRGNAM}-${VERSION} +chown -R root:root . +chmod -R u+w,go+r-w,a-s . - -# --- BUILDING --- - +# Compilation: echo Building ... LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ -./configure --prefix=`kde-config --prefix` \ +./configure --prefix=$(kde-config --prefix) \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log make 2>&1 | tee $OUTPUT/make-${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 +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 - -# --- DOCUMENTATION --- - +# Add some documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* @@ -213,23 +195,13 @@ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true cd - - -# --- OWNERSHIP, RIGHTS --- - -chmod -R o-w $PKG - - -# --- PACKAGE DESCRIPTION --- - +# Package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc if [ -f $SRCDIR/doinst.sh ]; then cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh fi - -# --- BUILDING --- - # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log @@ -238,9 +210,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}- cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt - -# --- CLEANUP --- - # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM |