summaryrefslogtreecommitdiffstats
path: root/multimedia/dvdbackup/dvdbackup.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/dvdbackup/dvdbackup.SlackBuild')
-rw-r--r--multimedia/dvdbackup/dvdbackup.SlackBuild31
1 files changed, 20 insertions, 11 deletions
diff --git a/multimedia/dvdbackup/dvdbackup.SlackBuild b/multimedia/dvdbackup/dvdbackup.SlackBuild
index 4b29260735..49033887db 100644
--- a/multimedia/dvdbackup/dvdbackup.SlackBuild
+++ b/multimedia/dvdbackup/dvdbackup.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for dvdbackup
@@ -23,10 +23,13 @@
# 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)
+
PRGNAM=dvdbackup
VERSION=${VERSION:-0.4.2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,13 +39,20 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -73,15 +83,14 @@ find -L . \
# Patch to not treat automake warnings as errors
patch -p0 < $CWD/patches/do_not_treat_automake_warnings_as_errors.patch
+# Patch for latest dvdread:
+patch -p0 < $CWD/patches/dvdbackup-dvdread-6.1.patch
+
# Patch to not change VOLUME_ID to Volume Id
if [ ${CLOBBER:-"yes"} == "no" ]; then
patch -p1 < $CWD/patches/dvdbackup_no-convert-title.patch
fi
-if [ "${CURRENT:-no}" = "yes" ]; then
- patch -p0 < $CWD/patches/dvdbackup-dvdread-6.1.patch
-fi
-
autoreconf -fiv
CFLAGS="$SLKCFLAGS" \
@@ -96,8 +105,8 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-#find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
-# | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG -print0 | xargs -0 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
@@ -111,4 +120,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE