diff options
Diffstat (limited to 'desktop/xonclock/xonclock.SlackBuild')
-rw-r--r-- | desktop/xonclock/xonclock.SlackBuild | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/desktop/xonclock/xonclock.SlackBuild b/desktop/xonclock/xonclock.SlackBuild index d621ae7ebb..bad6220346 100644 --- a/desktop/xonclock/xonclock.SlackBuild +++ b/desktop/xonclock/xonclock.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xonclock -# Copyright 2009 David Woodfall <dave@dawoodfall.net> +# Copyright 2009 David Woodfall <dave@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=xonclock VERSION=${VERSION:-0.0.9.4} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -82,18 +92,12 @@ LDFLAGS="-lm -lXrender" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +make install-strip DESTDIR=$PKG -find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true +gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README TODO AUTHORS INSTALL ChangeLog COPYING NEWS THANKS \ +cp -a README AUTHORS COPYING NEWS THANKS \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -101,4 +105,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |