summaryrefslogtreecommitdiffstats
path: root/gst-plugins-bad/build/gst-plugins-bad.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-12-14 14:32:12 +0000
committer Eric Hameleers <alien@slackware.com>2010-12-14 14:32:12 +0000
commit188082b0fac2ca51337191318359a4a925977613 (patch)
treec54331e89fad028b8f6bf20081081c5261009b20 /gst-plugins-bad/build/gst-plugins-bad.SlackBuild
parentf4a970e3cc4ced6d15c21ece59261d2e22de8604 (diff)
downloadasb-188082b0fac2ca51337191318359a4a925977613.tar.gz
asb-188082b0fac2ca51337191318359a4a925977613.tar.xz
Updated to 0.10.20
Diffstat (limited to 'gst-plugins-bad/build/gst-plugins-bad.SlackBuild')
-rwxr-xr-xgst-plugins-bad/build/gst-plugins-bad.SlackBuild59
1 files changed, 34 insertions, 25 deletions
diff --git a/gst-plugins-bad/build/gst-plugins-bad.SlackBuild b/gst-plugins-bad/build/gst-plugins-bad.SlackBuild
index 673d7807..91a8eb8a 100755
--- a/gst-plugins-bad/build/gst-plugins-bad.SlackBuild
+++ b/gst-plugins-bad/build/gst-plugins-bad.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2009 Eric Hameleers, Eindhoven, NL
+# 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.10.13-1: 01/Oct/2009 by Eric Hameleers, Eindhoven, NL
# * Initial build.
+# 0.10.20-1: 14/dec/2010 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh gst-plugins-bad.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -42,8 +44,7 @@
# Set initial variables:
PRGNAM=gst-plugins-bad
-VERSION=${VERSION:-0.10.13}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-0.10.20}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -66,31 +67,39 @@ SRCURL="http://gstreamer.freedesktop.org/src/${PRGNAM}/${PRGNAM}-${VERSION}.tar.
## --- 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"
;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
+ *) 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
@@ -102,10 +111,11 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# Source file availability:
if ! [ -f ${SOURCE} ]; then
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
- echo "Source '$(basename ${SOURCE})' not available yet..."
echo "Will download file to $(dirname $SOURCE)"
wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
@@ -135,7 +145,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 +169,7 @@ make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# 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 {} \;
@@ -189,3 +195,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+# Restore the original umask:
+umask ${_UMASK_}
+