diff options
author | Eric Hameleers <alien@slackware.com> | 2010-07-19 22:17:32 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2010-07-19 22:17:32 +0000 |
commit | 78e2c6f4f100ed3ddf039bc5b776cf91bc5de190 (patch) | |
tree | 94e83691f40fd0343c50257eb41e2dd7dbec0778 /wiipresent | |
parent | 97629ccdfe2d1df8dae298d5c81a4036fdd59b93 (diff) | |
download | asb-78e2c6f4f100ed3ddf039bc5b776cf91bc5de190.tar.gz asb-78e2c6f4f100ed3ddf039bc5b776cf91bc5de190.tar.xz |
Updated for Slackware 13.1
Diffstat (limited to 'wiipresent')
-rwxr-xr-x | wiipresent/build/wiipresent.SlackBuild | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/wiipresent/build/wiipresent.SlackBuild b/wiipresent/build/wiipresent.SlackBuild index 42f629d0..74332f0e 100755 --- a/wiipresent/build/wiipresent.SlackBuild +++ b/wiipresent/build/wiipresent.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009 Eric Hameleers <alien@slackware.com> +# Copyright 2009,2010 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -32,6 +32,8 @@ # Changelog: # 0.7.5.2-1: 07/Sep/2009 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 0.7.5.2-2: 20/jul/2010 by Eric Hameleers <alien@slackware.com> +# * Rebuilt for Slackware 13.1 # # Run 'sh wiipresent.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -43,8 +45,7 @@ PRGNAM=wiipresent VERSION=${VERSION:-0.7.5.2} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} @@ -65,28 +66,39 @@ SRCURL="http://dag.wieers.com/home-made/${PRGNAM}/${PRGNAM}-${VERSION}.tar.bz2" ## --- with a little luck, you won't have to edit below this point --- ## ## -# Exit the script on errors: -set -e -trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR -# Catch unitialized variables: -set -u -P1=${1:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; - s390) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - powerpc) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; + *) SLKCFLAGS="-O2" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; esac +# Exit the script on errors: +set -e +trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR +# Catch unitialized variables: +set -u +P1=${1:-1} + +# Save old umask and set to 0022: +_UMASK_=$(umask) +umask 0022 + # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source @@ -131,7 +143,7 @@ echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} chown -R root:root . -chmod -R u+w,go+r-w,a-s . +chmod -R u+w,go+r-w,a+X-s . echo Building ... LDFLAGS="$SLKLDFLAGS" \ @@ -159,11 +171,7 @@ EOT # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cat $SRCDIR/$(basename $0) | sed \ - -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ - -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ - -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ - > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; @@ -195,3 +203,6 @@ if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep fi +# Restore the original umask: +umask ${_UMASK_} + |