From 0062907d334a862e0a4a218678ffacded926652d Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 7 May 2008 20:34:13 +0000 Subject: Add TAG=alien ; better determination of SRCDIR ; add SlackBuild to docdir --- tpb/build/tpb.SlackBuild | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tpb/build') diff --git a/tpb/build/tpb.SlackBuild b/tpb/build/tpb.SlackBuild index e572443a..10685055 100755 --- a/tpb/build/tpb.SlackBuild +++ b/tpb/build/tpb.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2007 Eric Hameleers +# Copyright (c) 2007-2008 Eric Hameleers # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -28,7 +28,7 @@ # For: tpb # Descr: ThinkPad Buttons # URL: http://savannah.nongnu.org/projects/tpb -# Needs: +# Needs: xosd # Changelog: # 0.6.4-1: 18/Feb/2007 by Eric Hameleers # * Initial build. @@ -47,14 +47,13 @@ PRGNAM=tpb VERSION=${VERSION:-0.6.4} ARCH=${ARCH:-i486} BUILD=${BUILD:-2} +TAG=${TAG:-alien} DOCS="COPYING CREDITS ChangeLog README TODO \ doc/callback_example.sh doc/nvram.txt doc/tpbrc" # Where do we look for sources? -CWD=$(pwd) -SRCDIR=$(dirname $0) -[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} +SRCDIR=$(cd $(dirname $0); pwd) # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} @@ -106,10 +105,10 @@ esac # Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source -rm -rf $TMP/tmp-$PRGNAM/* # By default we 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 +rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # always erase old package's contents +mkdir -p $OUTPUT # place for the package to be saved # Source file availability: if ! [ -f ${SOURCE} ]; then @@ -118,7 +117,7 @@ if ! [ -f ${SOURCE} ]; then [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" - wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true + wget -nv -T 30 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL @@ -217,15 +216,15 @@ if ! [ -e dev/nvram ]; then Also add that second command to the file /etc/rc.d/rc.modules , so that the 'dev/nvram' device is created on every boot. - The '/dev/nvram' device must be readable by all. - If you want to _write_ to the '/dev/nvram' device, you must add - your account to the 'kmem' group. + The '/dev/nvram' device must be readable by all. This package adds + a UDEV rule that does this. EOM fi # Anyone using xdm/gdm/kdm will see tpb auto-started: if ! grep "/usr/bin/tpb" etc/xprofile 1>/dev/null 2>&1 ; then cat <<-_EOM_ >> etc/xprofile + # Load ThinkPad Buttons /usr/bin/tpb & @@ -237,7 +236,8 @@ EOINS # Add 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/* +cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): if [ -d $PKG/usr/man ]; then @@ -263,13 +263,13 @@ fi # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT -md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 +md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5 cd - -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt +cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt if [ -f $PKG/install/slack-required ]; then - cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep + cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep fi # Clean up the extra stuff: -- cgit v1.2.3-65-gdbad