summaryrefslogtreecommitdiffstats
path: root/lxdvdrip
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-09-24 15:01:36 +0000
committer Eric Hameleers <alien@slackware.com>2008-09-24 15:01:36 +0000
commit05326cc7871c62b5800065eacccb628e99b8da02 (patch)
tree489093eb1e092ad564a89fa151e198114de433c9 /lxdvdrip
parenta090c521ffd5de2f94fd8d289f70c5a190158fdf (diff)
downloadasb-05326cc7871c62b5800065eacccb628e99b8da02.tar.gz
asb-05326cc7871c62b5800065eacccb628e99b8da02.tar.xz
Update for 1.7.1, got rid of patches (using sed now)
Diffstat (limited to 'lxdvdrip')
-rwxr-xr-xlxdvdrip/build/lxdvdrip.SlackBuild70
1 files changed, 40 insertions, 30 deletions
diff --git a/lxdvdrip/build/lxdvdrip.SlackBuild b/lxdvdrip/build/lxdvdrip.SlackBuild
index 4ce3d56b..125ac5c1 100755
--- a/lxdvdrip/build/lxdvdrip.SlackBuild
+++ b/lxdvdrip/build/lxdvdrip.SlackBuild
@@ -33,6 +33,8 @@
# Changelog:
# 1.70-1: 18/Aug/2007 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 1.71-1: 24/sep/2008 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh lxdvdrip.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -43,17 +45,16 @@
# Set initial variables:
PRGNAM=lxdvdrip
-VERSION=${VERSION:-1.70}
+VERSION=${VERSION:-1.71}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
+TAG=${TAG:-alien}
DOCS="doc-pak/COPYING doc-pak/Changelog* doc-pak/Credits \
doc-pak/Debugging* doc-pak/README* doc-pak/TODO doc-pak/lxdvdrip.conf.*"
# Where do we look for sources?
-CWD=`pwd`
-SRCDIR=`dirname $0`
-[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR}
+SRCDIR=$(cd $(dirname $0); pwd)
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
@@ -75,16 +76,13 @@ set -u
P1=${1:-1}
# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
+if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
MOPT=tune
else
MOPT=cpu
fi
case "$ARCH" in
- i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
@@ -104,26 +102,26 @@ esac
# Create working directories:
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
-rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build
-mkdir -p $PKG # place for the package to be built
-rm -rf $PKG/* # We always erase old package's contents:
-mkdir -p $OUTPUT # place for the package to be saved
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # erase old package's contents
+mkdir -p $OUTPUT # place for the package to be saved
# Source file availability:
if ! [ -f ${SOURCE} ]; then
if ! [ "x${SRCURL}" == "x" ]; then
# Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/`basename $SOURCE`"
- echo "Source '`basename ${SOURCE}`' not available yet..."
- echo "Will download file to `dirname $SOURCE`"
- wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ echo "Will download file to $(dirname $SOURCE)"
+ wget -nv -T 30 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
- echo "Downloading '`basename ${SOURCE}`' failed... aborting the build."
+ echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
exit 1
fi
else
- echo "File '`basename ${SOURCE}`' not available... aborting the build."
+ echo "File '$(basename ${SOURCE})' not available... aborting the build."
exit 1
fi
fi
@@ -141,15 +139,25 @@ echo "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
-if `file ${SOURCE} | grep -q ": bzip2"`; then
+if $(file ${SOURCE} | grep -q ": bzip2"); then
tar -xjvf ${SOURCE}
-elif `file ${SOURCE} | grep -q ": gzip"`; then
+elif $(file ${SOURCE} | grep -q ": gzip"); then
tar -xzvf ${SOURCE}
fi
mv ${PRGNAM} ${PRGNAM}-${VERSION}
cd ${PRGNAM}-${VERSION}
-patch -p1 < ${SRCDIR}/lxdvdrip_Makefiles.patch 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
-patch -p0 < ${SRCDIR}/lxdvdrip_wavpath.patch 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Fix the location of the wav file:
+sed -i -e \
+ "s#/usr/local/share/lxdvdrip.wav#/usr/share/lxdvdrip/lxdvdrip.wav#g" \
+ $(grep -lr lxdvdrip.wav *)
+# Fix the Makefile mess:
+sed -i -e "s|\$(INSTALLDIR)/bin|\$(DESTDIR)/usr/bin|g" \
+ -e "s|\$(INSTALLDIR)/man/man1|\$(DESTDIR)/usr/man/man1|g" \
+ -e "s|\$(INSTALLDIR)/share|\$(DESTDIR)/usr/share/lxdvdrip|g" \
+ -e "s|/etc\b|\$(DESTDIR)/etc|g" \
+ -e "s|\$(PREFIX)/bin|\$(DESTDIR)/usr/bin|g" \
+ -e "s|\$(INSTBIN)|\$(DESTDIR)/usr/bin|g" \
+ Makefile */Makefile
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -157,11 +165,12 @@ echo Building ...
export LDFLAGS
export CFLAGS
export CXXFLAGS
-make PREFIX=/usr 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make -C vamps 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
# Install all the needed stuff to the package dir
mkdir -p $PKG/usr/{bin,share} $PKG/usr/man/man1 $PKG/etc
-make PREFIX=/usr DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Treat configuration file with care:
mv $PKG/etc/lxdvdrip.conf{,.new}
@@ -193,12 +202,14 @@ EOINS
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
+cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
- for i in `find $PKG/usr/man -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi
# Compress info pages and remove the package's dir file:
@@ -213,7 +224,6 @@ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
cd -
-
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
@@ -226,13 +236,13 @@ fi
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
-md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5
+md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
-cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
if [ -f $PKG/install/slack-required ]; then
- cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep
+ cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
fi
# Clean up the extra stuff: