summaryrefslogtreecommitdiff
path: root/multimedia/guvcview/guvcview.SlackBuild
diff options
context:
space:
mode:
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 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 <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