summaryrefslogtreecommitdiffstats
path: root/tvtime
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-03-15 23:04:59 +0000
committer Eric Hameleers <alien@slackware.com>2009-03-15 23:04:59 +0000
commit79762e492409fcaad6d6fa0a0fbfcbb7465e75ee (patch)
treeb39bb17aeda37fb83ef29a9f4533a7edd387291d /tvtime
parent5836cca309f5d503af4c9b9655ac919882af74a9 (diff)
downloadasb-79762e492409fcaad6d6fa0a0fbfcbb7465e75ee.tar.gz
asb-79762e492409fcaad6d6fa0a0fbfcbb7465e75ee.tar.xz
Modernize the template a bit
Diffstat (limited to 'tvtime')
-rwxr-xr-xtvtime/build/tvtime.SlackBuild38
1 files changed, 11 insertions, 27 deletions
diff --git a/tvtime/build/tvtime.SlackBuild b/tvtime/build/tvtime.SlackBuild
index 6f2678f9..d626526e 100755
--- a/tvtime/build/tvtime.SlackBuild
+++ b/tvtime/build/tvtime.SlackBuild
@@ -41,8 +41,6 @@
#
# -----------------------------------------------------------------------------
-# Set initial variables:
-
PRGNAM=tvtime
VERSION=${VERSION:-1.0.1}
ARCH=${ARCH:-i486}
@@ -51,9 +49,7 @@ BUILD=${BUILD:-2}
DOCS="ABOUT-NLS AUTHORS COPYING COPYING.LGPL ChangeLog NEWS README docs/html/*"
# 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}
@@ -62,7 +58,7 @@ OUTPUT=${OUTPUT:-/tmp}
# Input URL: http://dl.sourceforge.net/tvtime/tvtime-1.0.1.tar.gz
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
+SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -75,18 +71,8 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
set -u
P1=${1:-1}
-# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
- MOPT=tune
-else
- MOPT=cpu
-fi
-
case "$ARCH" in
- i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
s390) SLKCFLAGS="-O2"
@@ -104,11 +90,11 @@ case "$ARCH" in
esac
# Create working directories:
+mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # erase old package's contents
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 file availability:
if ! [ -f ${SOURCE} ]; then
@@ -117,7 +103,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
@@ -163,8 +149,8 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--sysconfdir=/etc \
- --program-prefix="" \
- --program-suffix="" \
+ --program-prefix= \
+ --program-suffix= \
--build=$ARCH-slackware-linux \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
@@ -226,10 +212,8 @@ if [ -d $PKG/usr/man ]; then
fi
# Strip binaries:
-cd $PKG
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-cd -
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Add a package description:
mkdir -p $PKG/install