summaryrefslogtreecommitdiffstats
path: root/source/x/libvdpau/libvdpau.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsource/x/libvdpau/libvdpau.SlackBuild22
1 files changed, 17 insertions, 5 deletions
diff --git a/source/x/libvdpau/libvdpau.SlackBuild b/source/x/libvdpau/libvdpau.SlackBuild
index e0ee6e002..f44f36440 100755
--- a/source/x/libvdpau/libvdpau.SlackBuild
+++ b/source/x/libvdpau/libvdpau.SlackBuild
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libvdpau
# Copyright 2009-2015 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2012-2013 Edward Koenig, Vancouver, WA, USA
-# Copyright 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=libvdpau
VERSION=${VERSION:-$(echo libvdpau-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,6 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:--j6}
if [ "$ARCH" = "i586" ]; then
@@ -52,7 +62,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -79,11 +88,14 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install-strip DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
mkdir -p $PKG/etc/profile.d
cp -a $CWD/profile.d/vdpau.sh $PKG/etc/profile.d/vdpau.sh.new
cp -a $CWD/profile.d/vdpau.csh $PKG/etc/profile.d/vdpau.csh.new