diff options
Diffstat (limited to 'MPlayer/build/MPlayer.SlackBuild')
-rwxr-xr-x | MPlayer/build/MPlayer.SlackBuild | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/MPlayer/build/MPlayer.SlackBuild b/MPlayer/build/MPlayer.SlackBuild index 43ac8f21..00b80707 100755 --- a/MPlayer/build/MPlayer.SlackBuild +++ b/MPlayer/build/MPlayer.SlackBuild @@ -25,6 +25,10 @@ # REMOVECSS="no" ./MPlayer.SlackBuild # 1.0rc1-3: 08/Nov/2006 by Eric Hameleers <alien@slackware.com> # * Install the mplayer.conf into correct location '/etc/mplayer/' +# 1.0rc1-4: 15/mar/2007 by Eric Hameleers <alien@slackware.com> +# * Differentiate between versions of X11 (modular X has another +# install-prefix); update default skin; enable mplayer menu; +# add security fix # # Run 'sh SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -36,15 +40,15 @@ # Set initial variables: PRGNAM=MPlayer -VERSION=${VERSION:-1.0rc1} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-3} +VERSION=${VERSION:-"1.0rc1"} +ARCH=${ARCH:-"i486"} +BUILD=${BUILD:-"4"} DOCS="AUTHORS ChangeLog Copyright LICENSE README DOCS/HTML DOCS/tech" CODECSDIR=/usr/lib/codecs # Where the WIN32 codecs are expected for instance -DEFSKIN=Blue # Download more at http://www.mplayerhq.hu/design7/dload.html -SKINVER=1.6 +DEFSKIN=${DEFSKIN:-"Blue"} # Download more at http://www.mplayerhq.hu/design7/dload.html +SKINVER=${SKINVER:-"1.7"} LANGUAGES="en nl fr de es" # The default is to just add "en" documentation # MPlayer will try to use one of the TrueType fonts present on the target @@ -71,6 +75,11 @@ OSDFONTS="Arialuni.ttf arial.ttf DejaVuSans.ttf Vera.ttf" # Set REMOVECSS="no" if you want MPLayer to use it's internal dvdcss code. REMOVECSS=${REMOVECSS:-yes} +# Determine what X we're running (the modular X returns the prefix +# in the next command, while older versions stay silent): +XPREF=`pkg-config --variable=prefix x11` || true +[ "$XPREF" == "" ] && XPREF='/usr/X11R6' + # Where do we look for sources? CWD=`pwd` SRCDIR=`dirname $0` @@ -87,7 +96,11 @@ SRCURL[0]="http://www4.mplayerhq.hu/${PRGNAM}/releases/${PRGNAM}-${VERSION}.tar. # The default skin to use (we need to add at least one) SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2" -SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/Blue-1.6.tar.bz2" +SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2" + +# Security fix: +SOURCE[2]="$SRCDIR/asmrules_fix_20061231.diff" +SRCURL[2]="http://www.mplayerhq.hu/MPlayer/patches/asmrules_fix_20061231.diff" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -162,42 +175,30 @@ if [ "$REMOVECSS" == "yes" ]; then sleep 2 fi -cd $PKG - -# Explode the package framework: -if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then - explodepkg $SRCDIR/_$PRGNAM.tar.gz -fi - cd $TMP/tmp-$PRGNAM - - -# --- TARBALL EXTRACTION,PATCH,MODIFY --- - echo "Extracting the source archive(s) for $PRGNAM..." -tar -xjvf ${SOURCE[0]} || true -if [ $? -ne 0 ]; then - echo "Error in unpacking '${SOURCE[0]}!' Aborting..." - exit $? -fi +tar -xjvf ${SOURCE[0]} cd ${PRGNAM}-${VERSION} +chown -R root.root * +chmod -R a-s,u+rw,go+r-w * + +# Fix a security problem: read http://www.debian.org/security/2006/dsa-1244 +patch -p0 < ${SOURCE[3]} 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log # Remove potentially illegal dvdcss code (in which case, make sure you have # libdvdread installed before you start the compile!): [ "$REMOVECSS" == "yes" ] && rm -rf libmpdvdkit2 -chown -R root.root * -find . -perm 777 -exec chmod 755 {} \; -find . -perm 666 -exec chmod 644 {} \; - # --- BUILDING --- echo Building ... -# MPlayer wants to automatically determine compiler flags: +# MPlayer wants to automatically determine compiler flags, +# so we don't provide CFLAGS: ./configure --prefix=/usr \ --confdir=/etc/mplayer \ --enable-runtime-cpudetection \ --enable-gui \ + --enable-menu \ --enable-largefiles \ --with-codecsdir=${CODECSDIR} \ --with-win32libdir=${CODECSDIR} \ @@ -259,9 +260,9 @@ config() { # Configure a default TrueType font to use for the OSD : if [ ! -f usr/share/mplayer/subfont.ttf ]; then for font in ${OSDFONTS}; do - if [ -f usr/X11R6/lib/X11/fonts/TTF/\${font} ]; then + if [ -f .${XPREF}/lib/X11/fonts/TTF/\${font} ]; then ( cd usr/share/mplayer/ - ln -sf /usr/X11R6/lib/X11/fonts/TTF/\${font} subfont.ttf + ln -sf ${XPREF}/lib/X11/fonts/TTF/\${font} subfont.ttf ) break fi @@ -293,11 +294,10 @@ done chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* # Compress the man page(s) -[ -d $PKG/usr/man ] && ( - cd $PKG/usr/man - find . -type f -name "*.?" -exec gzip -9f {} \; - for i in `find . -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - ) +cd $PKG/usr/man +find . -type f -name "*.?" -exec gzip -9f {} \; +for i in `find . -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +cd - # Strip binaries ( cd $PKG @@ -328,7 +328,9 @@ fi # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log -(cd $OUTPUT && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5) +cd $OUTPUT +md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 +cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep |