From 5ca39d2ad40b3f97bf4cbecc30a97b0126b0835c Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Wed, 26 Dec 2012 10:53:47 +0100 Subject: multimedia/guvcview: Added pulseaudio switch, cleanups. Signed-off-by: Matteo Bernardini --- multimedia/guvcview/guvcview.SlackBuild | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'multimedia/guvcview/guvcview.SlackBuild') diff --git a/multimedia/guvcview/guvcview.SlackBuild b/multimedia/guvcview/guvcview.SlackBuild index 4388224074..2a9f7192b8 100644 --- a/multimedia/guvcview/guvcview.SlackBuild +++ b/multimedia/guvcview/guvcview.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for GuvcView. # -# Copyright 2010-2011 Willy Sudiarto Raharjo +# Copyright 2010-2012 Willy Sudiarto Raharjo # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,10 +25,10 @@ PRGNAM=guvcview VERSION=${VERSION:-1.6.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} -DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README" +DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL README" if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -43,6 +43,9 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# By default, we don't want to use PulseAudio +PULSE=${PULSE:-"no"} + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -57,6 +60,13 @@ else LIBDIRSUFFIX="" fi +# Give users an option to use PulseAudio +if [ "$PULSE" = "YES" ]; then + PULSEAUDIO="" +else + PULSEAUDIO="--disable-pulse" +fi + set -e rm -rf $PKG @@ -78,18 +88,24 @@ CXXFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ + --mandir=/usr/man \ --localstatedir=/var \ + --disable-debian-menu \ + $PULSEAUDIO \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG -# ignores --mandir -mv $PKG/usr/share/man $PKG/usr/man - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +# Remove redundant documentations +rm -rf $PKG/usr/share/doc + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -- cgit v1.2.3