diff options
author | Eric Hameleers <alien@slackware.com> | 2011-03-13 16:04:48 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2011-03-13 16:04:48 +0000 |
commit | 6e5e23aea606e614e042feb50586f76dd97a059c (patch) | |
tree | e89b339fa19e09ebea4bee87c7db3c2b4bab43ab /mkvtoolnix | |
parent | 9a68b178e847bf1961fa6ad50d4619d1b9ba6ff1 (diff) | |
download | asb-6e5e23aea606e614e042feb50586f76dd97a059c.tar.gz asb-6e5e23aea606e614e042feb50586f76dd97a059c.tar.xz |
Update to 4.6.0
Diffstat (limited to 'mkvtoolnix')
-rwxr-xr-x | mkvtoolnix/build/mkvtoolnix.SlackBuild | 130 |
1 files changed, 64 insertions, 66 deletions
diff --git a/mkvtoolnix/build/mkvtoolnix.SlackBuild b/mkvtoolnix/build/mkvtoolnix.SlackBuild index a2d6e11a..390e81fd 100755 --- a/mkvtoolnix/build/mkvtoolnix.SlackBuild +++ b/mkvtoolnix/build/mkvtoolnix.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009 Eric Hameleers, Eindhoven, NL +# Copyright (c) 2009, 2011 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -28,12 +28,15 @@ # For: mkvtoolnix # Descr: Matroska container manipulation utilities # URL: http://www.bunkus.org/videotools/mkvtoolnix/ -# Needs: libebml, libmatroska, wxGTK +# Needs: wxGTK # Changelog: # 2.8.0-1: 14/May/2009 by Eric Hameleers <alien@slackware.com> # * Initial build. # 2.9.8-1: 09/oct/2009 by Eric Hameleers <alien@slackware.com> # * Update. The 64-bit package was missing the GUI. +# 4.6.0-1: 13/mar/2011 by Eric Hameleers <alien@slackware.com> +# * Update (long overdue). Using internal copies of libebml and +# libmatroska now, to minimize the dependency list. # # Run 'sh mkvtoolnix.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -44,14 +47,12 @@ # Set initial variables: PRGNAM=mkvtoolnix -VERSION=${VERSION:-2.9.8} -ARCH=${ARCH:-i486} +VERSION=${VERSION:-4.6.0} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} -DOCS="AUTHORS COPYING ChangeLog NEWS README ChangeLog TODO \ - doc/mkvmerge-gui.html doc/images" +DOCS="AUTHORS COPYING* ChangeLog NEWS README TODO" # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -68,28 +69,39 @@ SRCURL="http://www.bunkus.org/videotools/${PRGNAM}/sources/${PRGNAM}-${VERSION}. ## --- with a little luck, you won't have to edit below this point --- ## ## -# Exit the script on errors: -set -e -trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR -# Catch unitialized variables: -set -u -P1=${1:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; - s390) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - powerpc) SLKCFLAGS="-O2" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; + *) SLKCFLAGS="-O2" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; esac +# Exit the script on errors: +set -e +trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR +# Catch unitialized variables: +set -u +P1=${1:-1} + +# Save old umask and set to 0022: +_UMASK_=$(umask) +umask 0022 + # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source @@ -101,10 +113,11 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi 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 -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then @@ -134,7 +147,7 @@ echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} cd ${PRGNAM}-${VERSION} chown -R root:root . -chmod -R u+w,go+r-w,a-s . +chmod -R u+w,go+r-w,a+X-s . echo Building ... LDFLAGS="$SLKLDFLAGS" \ @@ -149,41 +162,17 @@ CFLAGS="$SLKCFLAGS" \ --sysconfdir=/etc \ --enable-gui \ --enable-wxwidgets \ + --enable-qt \ --program-prefix= \ --program-suffix= \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log - # Do not try to compile the mmg-qt gui for now - mkvinfo uses wxGTK anyway - #--enable-qt \ - -make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log - -# Add menu entries for the GUIs: -mkdir -p $PKG/usr/share/pixmaps -cp src/mmg/matroskalogo.xpm $PKG/usr/share/pixmaps/ -cp src/info/matroska.xpm $PKG/usr/share/pixmaps/ -mkdir -p $PKG/usr/share/applications -cat <<EOT > $PKG/usr/share/applications/mkvinfo.desktop -[Desktop Entry] -Name=MKVInfo Gui -Comment=Show information about Matroska files -Exec=mkvinfo -g -Terminal=false -Type=Application -Categories=GTK;AudioVideo; -Icon=matroska -EOT -cat <<EOT > $PKG/usr/share/applications/mmg.desktop -[Desktop Entry] -Name=MKVMerge Gui -Comment=Merge multiple media streams into a Matroska file -Exec=mmg -Terminal=false -Type=Application -Categories=GTK;AudioVideo; -Icon=matroskalogo -EOT + +# Use mkvtoolnix's internal version of rake so we don't have to depend on ruby: +./drake ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}.log + +# Install the lot: +./drake DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log # Add this to the doinst.sh: ! [ -d $PKG/install ] && mkdir -p $PKG/install @@ -193,20 +182,28 @@ if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 fi +# Update hicolor theme cache: +if [ -d usr/share/icons/hicolor ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null + fi +fi + +# Update the mime database: +if [ -x usr/bin/update-mime-database ]; then + chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + EOT # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cat $SRCDIR/$(basename $0) | sed \ - -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ - -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ - -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ - > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION -# Move the GUI documentation into our documentation directory:: -mv $PKG/usr/share/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION/html -ln -s /usr/doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM +## Move the GUI documentation into our documentation directory:: +#mv $PKG/usr/share/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION/html +#ln -s /usr/doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): @@ -216,8 +213,8 @@ if [ -d $PKG/usr/man ]; then fi # Strip binaries: -find $PKG | xargs file | grep -e "executable" -e "shared object" \ - | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true # Add a package description: mkdir -p $PKG/install @@ -231,7 +228,8 @@ cd $OUTPUT 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}${TAG}.txt -if [ -f $PKG/install/slack-required ]; then - cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep -fi +cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep + +# Restore the original umask: +umask ${_UMASK_} |