diff options
author | Eric Hameleers <alien@slackware.com> | 2011-05-17 19:25:38 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2011-05-17 19:25:38 +0000 |
commit | 331d311f89779b867d6bb95b6ff92a7d4d76a79a (patch) | |
tree | 85d3e248b14067d399ceb9556cb2b28f5579ad58 /gst-plugins-ugly/build | |
parent | 0d9018cf30260d44e85714bd32e99efd9dcb2e4c (diff) | |
download | asb-331d311f89779b867d6bb95b6ff92a7d4d76a79a.tar.gz asb-331d311f89779b867d6bb95b6ff92a7d4d76a79a.tar.xz |
Updated to 0.10.18
Diffstat (limited to 'gst-plugins-ugly/build')
-rwxr-xr-x | gst-plugins-ugly/build/gst-plugins-ugly.SlackBuild | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/gst-plugins-ugly/build/gst-plugins-ugly.SlackBuild b/gst-plugins-ugly/build/gst-plugins-ugly.SlackBuild index 3c7a3b5d..428b6820 100755 --- a/gst-plugins-ugly/build/gst-plugins-ugly.SlackBuild +++ b/gst-plugins-ugly/build/gst-plugins-ugly.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009 Eric Hameleers, Eindhoven, NL +# Copyright 2009, 20011 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -32,6 +32,8 @@ # Changelog: # 0.10.12-1: 01/Oct/2009 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 0.10.18-1: 16/may/2011 by Eric Hameleers <alien@slackware.com> +# * Update for Slackware 13.37. # # Run 'sh gst-plugins-ugly.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-ugly -VERSION=${VERSION:-0.10.12} -ARCH=${ARCH:-i486} +VERSION=${VERSION:-0.10.18} BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -64,28 +65,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" ;; + *) 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 @@ -97,10 +109,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 @@ -130,7 +143,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" \ @@ -153,11 +166,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 {} \; @@ -183,3 +192,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_} + |