summaryrefslogtreecommitdiffstats
path: root/MPlayer/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-07-01 12:16:58 +0000
committer Eric Hameleers <alien@slackware.com>2012-07-01 12:16:58 +0000
commit64ad6477083315d45d5d2b6b34df4021b73eb19e (patch)
treed59c2c931ebeafccd8466c502057379470d0d311 /MPlayer/build
parent05022baffdc017cec7588944ab8b40332eb9ded6 (diff)
downloadasb-64ad6477083315d45d5d2b6b34df4021b73eb19e.tar.gz
asb-64ad6477083315d45d5d2b6b34df4021b73eb19e.tar.xz
Update to MPlayer 1.1
Diffstat (limited to 'MPlayer/build')
-rwxr-xr-xMPlayer/build/MPlayer.SlackBuild106
1 files changed, 62 insertions, 44 deletions
diff --git a/MPlayer/build/MPlayer.SlackBuild b/MPlayer/build/MPlayer.SlackBuild
index 4278c064..68f36fb7 100755
--- a/MPlayer/build/MPlayer.SlackBuild
+++ b/MPlayer/build/MPlayer.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2006, 2007, 2008, 2010, 2011 Eric Hameleers, Eindhoven, NL
+# Copyright 2006, 2007, 2008, 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -75,11 +75,14 @@
# * Provide an up-to-date snapshot to be used in conjunction
# with UMPlayer (a MPlayer GUI). New MPlayer source requires
# a separate ffmpeg download.
-# 20110831-1: 31/aug/2011 by Eric Hameleers <alien@slackware.com>
-# * Update the used snapshot.
+# 20120514-1: 14/may/2012 by volkerdi@slackware.com
+# * Update.
+# 1.1_20120701-1: 28/jun/2012 by alien@slackware.com
+# * Update to the 1.1 branch (essentially this is MPlayer-1.1 but
+# I like to check it out of SVN).
#
# Run 'sh MPlayer.SlackBuild' to build a Slackware package.
-# The package (.tgz) plus descriptive .txt file are created in /tmp .
+# The package (.txz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------
@@ -87,27 +90,42 @@
# Set initial variables:
PRGNAM=MPlayer
-VERSION=${VERSION:-20110831}
-FFMPEG=${FFMPEG:-HEAD}
+VERSION=${VERSION:-20120701}
+BRANCH=${BRANCH:-1.1} # leave empty if you want to build MPlayer trunk
+FFMPEG=${FFMPEG:-$VERSION}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
-DOCS="AUTHORS Changelog Copyright LICENSE README DOCS/HTML DOCS/tech"
+# Show the branch version in the package name if we build from a branch:
+[ -n "$BRANCH" ] && PKGVERSION=${BRANCH}_${VERSION} || PKGVERSION=${VERSION}
+
+DOCS="AUTHORS Changelog Copyright LICENSE README VERSION DOCS/HTML DOCS/tech"
+
+# MPlayer repository characteristics:
+MPURI="svn://svn.mplayerhq.hu/mplayer/"
+if [ -n "$BRANCH" ]; then
+ MPBRANCH="branches/$BRANCH"
+else
+ MPBRANCH="trunk"
+fi
+
+FFURI=git://git.videolan.org/ffmpeg.git
DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url:
-SKINVER=${SKINVER:-"1.7"} # http://www.mplayerhq.hu/design7/dload.html
+SKINVER=${SKINVER:-"1.8"} # http://www.mplayerhq.hu/design7/dload.html
-# Available languages: all bg cs de dk el en es fr hu it ja
-# ko mk nb nl pl ro ru sk sv tr uk pt_BR zh_CN zh_TW
-LANGUAGES="all" # The default is to just add "en" documentation
+# Available languages: all cs de en es fr hu it pl ru zh_CN
+LANGUAGES="en,de,es,fr"
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
@@ -150,8 +168,7 @@ CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs
# MPlayer's internal libdvdread library, so that MPlayer will again be able
# to play encrypted DVD's.
# ---------------------------------------------------------------------------
-#USE_PATENTS="NO"
-USE_PATENTS=${USE_PATENTS:-"YES"}
+USE_PATENTS=${USE_PATENTS:-"NO"}
# MPlayer will try to use one of the TrueType fonts present on the target
# system for it's On Screen Display (OSD) font.
@@ -171,7 +188,7 @@ OSDFONTS="LiberationSans-Regular.ttf \
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
-SOURCE[0]="$SRCDIR/${PRGNAM}${EXTRA}-${VERSION}.tar.bz2"
+SOURCE[0]="$SRCDIR/${PRGNAM}${EXTRA}-${VERSION}.tar.xz"
SRCURL[0]=""
# The default skin to use (we need to add at least one)
@@ -179,7 +196,7 @@ SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2"
SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2"
# Ffmpeg needs to be checked out separately now:
-SOURCE[2]="$SRCDIR/ffmpeg-${VERSION}.tar.bz2"
+SOURCE[2]="$SRCDIR/ffmpeg-${FFMPEG}.tar.xz"
SRCURL[2]=""
# Use the src_checkout() function if no downloadable tarball exists.
@@ -205,7 +222,7 @@ src_checkout() {
fi
mkdir MPlayer-${VERSION} \
&& cd MPlayer-${VERSION} \
- && svn checkout --revision $REV svn://svn.mplayerhq.hu/mplayer/trunk . \
+ && svn checkout --revision $REV ${MPURI}/${MPBRANCH} . \
&& svn propget svn:externals | sed -e 's/[[:space:]].*$//g' | xargs svn up --revision $REV \
&& find . -type d -name '.svn' -depth | xargs rm -rf \
&& ([ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss || true) \
@@ -215,18 +232,17 @@ src_checkout() {
rm -rf MPlayer-${VERSION}
;;
2) # ffmpeg-${FFMPEG}
- GITURI=git://git.videolan.org/ffmpeg.git
mkdir ffmpeg_temp_checkout_$$ \
&& cd ffmpeg_temp_checkout_$$
if [ "$FFMPEG" = "HEAD" ]; then
# Checkout without downloading version history (fast!):
- echo "Checking out HEAD from '$GITURI':"
- git clone --depth=1 ${GITURI} ffmpeg
+ echo "Checking out HEAD from '$FFURI':"
+ git clone --depth=1 ${FFURI} ffmpeg
else
# Checkout code from a certain branch and/or date; this will take a
# long time because we have to clone the complete git-repository first:
- echo "Checking out branch 'master' at date $FFMPEG from '$GITURI':"
- git clone ${GITURI} ffmpeg \
+ echo "Checking out branch 'master' at date $FFMPEG from '$FFURI':"
+ git clone ${FFURI} ffmpeg \
&& cd ffmpeg \
&& git checkout master \
&& git checkout $(git rev-list -n 1 --before="`date -d $FFMPEG`" master) \
@@ -361,20 +377,22 @@ echo Building ...
${DO_PATENTED} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
# So that MPlayer does not report "UNKNOWN" as it's version:
-echo $VERSION > VERSION
+if [ ! -f VERSION ]; then
+ echo $VERSION > VERSION
+fi
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Build the html documentation (not all languages are available):
-( cd DOCS/xml
- if [ "$LANGUAGES" = "all" ]; then
- make html-chunked
- else
- for i in $(echo $LANGUAGES | tr , ' ') ; do
- [ -d $i ] && make html-single-$i ;
- done
- fi
-)
+if [ "$LANGUAGES" = "all" ]; then
+ # make html-chunked
+ make html-single
+else
+ for i in $(echo $LANGUAGES | tr , ' ') ; do
+ # make html-chunked-$i ;
+ make html-single-$i ;
+ done
+fi
# Prepare the configfile:
mkdir -p $PKG/etc/mplayer
@@ -444,19 +462,19 @@ fi
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
-mv $PKG/usr/doc/$PRGNAM-$VERSION/HTML $PKG/usr/doc/$PRGNAM-$VERSION/html
+mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVERSION || true
+cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$PKGVERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/doc/$PRGNAM-$PKGVERSION/HTML $PKG/usr/doc/$PRGNAM-$PKGVERSION/html
# Save a sample of all configuration files:
for i in etc/*.conf ; do
- cp $i $PKG/usr/doc/$PRGNAM-$VERSION/$(basename $i)-sample
+ cp $i $PKG/usr/doc/$PRGNAM-$PKGVERSION/$(basename $i)-sample
done
# Save a transcript of all configured options for this specific build:
if [ -n $OUTPUT/configure-${PRGNAM}.log ]; then
cat $OUTPUT/configure-${PRGNAM}.log \
| sed -n "/^Config files successfully generated/,/^'config.h' and 'config.mak' contain your configuration options./p" \
- > $PKG/usr/doc/$PRGNAM-$VERSION/${PRGNAM}.configuration
+ > $PKG/usr/doc/$PRGNAM-$PKGVERSION/${PRGNAM}.configuration
fi
find $PKG/usr/doc -type f -exec chmod 644 {} \;
@@ -479,11 +497,11 @@ fi
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
-md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
+md5sum ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
cd -
-cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt
# Warn about libdvdcss requirement (again):
if [ "$USE_PATENTS" != "YES" ]; then