aboutsummaryrefslogtreecommitdiff
path: root/multimedia/guvcview/guvcview.SlackBuild
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackware-id.org>2012-12-26 10:53:47 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2012-12-26 21:36:47 +0100
commit5ca39d2ad40b3f97bf4cbecc30a97b0126b0835c (patch)
tree532c6a15bc5ce99b25666d82ddf7a8a03db11b91 /multimedia/guvcview/guvcview.SlackBuild
parent1a4eb09f5e3905c08bf991dae7f971010e25696d (diff)
multimedia/guvcview: Added pulseaudio switch, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'multimedia/guvcview/guvcview.SlackBuild')
-rw-r--r--multimedia/guvcview/guvcview.SlackBuild28
1 files changed, 22 insertions, 6 deletions
diff --git a/multimedia/guvcview/guvcview.SlackBuild b/multimedia/guvcview/guvcview.SlackBuild
index 4388224074c3f..2a9f7192b8653 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 <willysr@slackware-id.org>
+# Copyright 2010-2012 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# 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