summaryrefslogtreecommitdiffstats
path: root/SDL_sound
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-05-23 09:15:41 +0000
committer Eric Hameleers <alien@slackware.com>2008-05-23 09:15:41 +0000
commit00c1136e5881b2e50fd35af6c21d5411d4ba3436 (patch)
tree063e6b7e796dd5ef5d1e31bb09d6461799ef8e63 /SDL_sound
parenta4a25b9d3dbfa67f8bfdb10ffa05b8b3fb020903 (diff)
downloadasb-00c1136e5881b2e50fd35af6c21d5411d4ba3436.tar.gz
asb-00c1136e5881b2e50fd35af6c21d5411d4ba3436.tar.xz
Update for 1.0.3. Add TAG=alien, change SRCDIR, add SlackBuild to docdir
Diffstat (limited to 'SDL_sound')
-rwxr-xr-xSDL_sound/build/SDL_sound.SlackBuild37
1 files changed, 18 insertions, 19 deletions
diff --git a/SDL_sound/build/SDL_sound.SlackBuild b/SDL_sound/build/SDL_sound.SlackBuild
index 7f9b7370..b8f854ab 100755
--- a/SDL_sound/build/SDL_sound.SlackBuild
+++ b/SDL_sound/build/SDL_sound.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2007-2008 Eric Hameleers <alien@slackware.com>
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -33,6 +33,8 @@
# Changelog:
# 1.0.1-1: 02/Aug/2007 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 1.0.3-1: 23/may/2008 by Eric Hameleers <alien@slackware.com>
+# * Update
#
# Run 'sh SDL_sound.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -43,16 +45,15 @@
# Set initial variables:
PRGNAM=SDL_sound
-VERSION=${VERSION:-1.0.1}
+VERSION=${VERSION:-1.0.3}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
+TAG=${TAG:-alien}
DOCS="CHANGELOG COPYING CREDITS INSTALL README TODO"
# 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}
@@ -81,9 +82,6 @@ else
fi
case "$ARCH" in
- i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
@@ -103,10 +101,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/* # erase old package's contents
+mkdir -p $OUTPUT # place for the package to be saved
# Source file availability:
if ! [ -f ${SOURCE} ]; then
@@ -115,7 +113,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
@@ -152,6 +150,7 @@ chmod -R u+w,go+r-w,a-s .
echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
@@ -165,7 +164,7 @@ 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
@@ -174,7 +173,8 @@ fi
# 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
@@ -188,18 +188,17 @@ 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 -
-
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# 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
# Clean up the extra stuff:
if [ "$P1" = "--cleanup" ]; then