aboutsummaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2009-04-23 15:11:01 +0000
committerrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2009-04-23 15:11:01 +0000
commit7d051fe30a635c93aa4db55ba0b553ed93f9a48d (patch)
treeceecbbe03594493a38176d8056ac9965d88bf624 /media
parent8a4fb306c796938b76a28391342a87e02f4589cc (diff)
downloadslackbuilds-7d051fe30a635c93aa4db55ba0b553ed93f9a48d.tar.gz
slackbuilds-7d051fe30a635c93aa4db55ba0b553ed93f9a48d.tar.bz2
mplayer version changed to snapshot...
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2150 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media')
-rwxr-xr-xmedia/video/mplayer/MPlayer.SlackBuild42
-rw-r--r--media/video/mplayer/Manifest6
-rw-r--r--media/video/mplayer/mplayer-export.SlackBuild205
-rw-r--r--media/video/mplayer/slack-required2
4 files changed, 229 insertions, 26 deletions
diff --git a/media/video/mplayer/MPlayer.SlackBuild b/media/video/mplayer/MPlayer.SlackBuild
index bedc832b..d26d4527 100755
--- a/media/video/mplayer/MPlayer.SlackBuild
+++ b/media/video/mplayer/MPlayer.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for MPlayer, by Silvio Rhatto
# requires: speex jack libx264 faac faad2
-# tested: MPlayer-1.0rc2
+# tested: MPlayer-snapshot
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -28,32 +29,29 @@ fi
# Set variables
CWD="$(pwd)"
-SRC_NAME="MPlayer"
+SRC_NAME="mplayer-export"
PKG_NAME="MPlayer"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.0rc2}
+SRC_VERSION=${VERSION:=snapshot}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="media/video/mplayer"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
-CONF_OPTIONS=${CONF_OPTIONS:="--disable-ivtv --confdir=/etc --language=pt_BR --enable-largefiles --enable-gui --enable-real"}
+CONF_OPTIONS=${CONF_OPTIONS:="--confdir=/etc --language=pt_BR --enable-largefiles --enable-gui"}
NUMJOBS=${NUMJOBS:=""}
# Set system libraries' path and optmization flags based on $ARCH
LIBDIR="$PREFIX/lib"
-if [ "$ARCH" == "i586" ] || [ "$ARCH" == "i686" ]; then
- CONF_OPTIONS="$CONF_OPTIONS --enable-qtx"
-fi
-
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -69,6 +67,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
# Clean up any leftovers of previous builds
rm -rf "$PKG_WORK" 2> /dev/null
@@ -106,10 +105,11 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Patch source
-patches="
+patches=" [[PATCH URLS]]
$PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
$PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
for patch in $patches; do
+ patch="`basename $patch`"
if [ -f "$CWD/$patch" ]; then
patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch" ]; then
@@ -118,15 +118,7 @@ for patch in $patches; do
gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch.gz" ]; then
gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
- fi
-done
-
-if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
- for patch_url in [[PATCH URLS]]; do
- patch="`basename $patch_url`"
- if [ ! -s "$SRC_DIR/$patch" ]; then
- wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
- fi
+ elif [ -f "$SRC_DIR/$patch" ]; then
if [ "`basename $patch .gz`" != "$patch" ]; then
gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
elif [ "`basename $patch .bz2`" != "$patch" ]; then
@@ -134,12 +126,11 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
else
patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
fi
- done
-fi
+ fi
+done
# Configure
-CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
+CFLAGS= CXXFLAGS= \
./configure \
--prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
@@ -204,7 +195,8 @@ fi
# Build the package
cd "$PKG"
-makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
diff --git a/media/video/mplayer/Manifest b/media/video/mplayer/Manifest
new file mode 100644
index 00000000..8b437e00
--- /dev/null
+++ b/media/video/mplayer/Manifest
@@ -0,0 +1,6 @@
+DIST mplayer-export-snapshot.tar.bz2 8207032 MD5 8f9ef66219521a765f2c76f232cd06b5 RMD160 79a8b6531e78d3800456812af9c191f839be39f1 SHA1 4bacf80ecf406e8e27d2de57868fbff64655f535 SHA256 6b4e26ff65925de8695d1f56fc14ae3ed4c08601af965f36bd21d45a3fa8d318 SHA512 ea533f85a10a9b74e7d66b133ea65b282db0e7091f2bc4587181e58726618b42b5089dcfc1b58d423aa9c7d0948de344288fbcc45d581d4608228e5d64a2a60e
+MKBUILD MPlayer.mkbuild 4651 MD5 7c35db0d233aa671623d088192b09320 RMD160 9b15422649fefffe9143df3b54e5f971b6c906c5 SHA1 9d3196b1e90cf94cbe73861913cca8b6624e0089 SHA256 7454cda176c89434689c4120d9903a8013638f73a69d7397bf0d6fba26cc3ca4 SHA512 8d89347cab1da91589a949682fc519e16f94e03eb03d39fbadcbd60edc4c49b36786bccf1e290911399f9141c69dbf5a7addb8750510e57e7684f6e914a04067
+PATCH MPlayer-1.0rc1.diff 1290 MD5 bd8a233ea31c6686a956387ad28c5c5c RMD160 0bf83ef398927ef28b5bf4287f1a1e9bb3bd4454 SHA1 4ed701ae65ede2f3510668be85d1efb093dc1f3c SHA256 480622f56e111db471010511ec7bc01d1302149a75d2549b9e57363530d0e918 SHA512 687cd547786e2397ee3fd565054c3306e6a8ffec2bac38400d388d0f58fcd2a4e31a8ec65fe3cd89f660cf36f51650fe61e75b6ac98dbf5544a52ded5e7e41cf
+SLACK-REQUIRED slack-required 124 MD5 1e1b4d769504ed25dcb8acd4d38c215e RMD160 461066b116af20348561d3d0fc03d12aa587fdcf SHA1 939c20c730d1ad016a2a2adc1308c1be51acaf36 SHA256 726f86886b9feec0d186aec988b2fce92f6cdc7d4864cf8f921d3f5384abb502 SHA512 00133dece716b260287118c9a552720635a2b123c52b1f5192da45e515714da6666cf5749bb2a084b853d4d8167ac20f144e6001a3cc9bfc1112ed55f1a0b24a
+SLACKBUILD MPlayer.SlackBuild 7009 MD5 5e885ee0c3c61ae6c1a2884035d473f7 RMD160 1c8d0ca81e7d438c52ca8b5c81f7297e50accbd6 SHA1 b49f5fe048a63a867a58b0bca510f554aadf0f3f SHA256 502dbac905c3017d7ee61254303a57dba15d561ad62500f159d649a4533f2e58 SHA512 76cc6740fc6311fcc196bf6b50d209a3829351def4da94285011b5140118ebdae1e854d9b02b85e2e6955f42fb5ceab067a155b8b9ac3ac7093e8627e8741947
+SLACKBUILD mplayer-export.SlackBuild 7072 MD5 9fd696a2e454714dc06ef9ee7693d4b7 RMD160 3357aeab4134410226967e1eff62ac564c518d17 SHA1 2325f26f4018ed5a176b6d7ae44e735c8856c193 SHA256 412292c5db6fe29fe70494c5debaa969dab4f877296b4653cbffef6183c71cc8 SHA512 b30717ed524c623e096ed0c6ceaefc0613e36d6fbd739d871ec499083d2b67e1a17dabdebdc740c3c8046399050f6f2ef32966143078b16c21d4094ec0b0d9a3
diff --git a/media/video/mplayer/mplayer-export.SlackBuild b/media/video/mplayer/mplayer-export.SlackBuild
new file mode 100644
index 00000000..7fcd15eb
--- /dev/null
+++ b/media/video/mplayer/mplayer-export.SlackBuild
@@ -0,0 +1,205 @@
+#!/bin/bash
+#
+# mplayer-export.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# mplayer-export.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for mplayer-export, by Silvio Rhatto
+# requires: speex jack libx264 faac faad2
+# tested: mplayer-export-snapshot
+# model: generic.mkSlackBuild $Rev: 805 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="mplayer-export"
+PKG_NAME="mplayer-export"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=snapshot}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="media/video/mplayer"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--confdir=/etc --language=pt_BR --enable-largefiles --enable-gui"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="http://www1.mplayerhq.hu/MPlayer/releases/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Download skin
+SKIN="Blue"
+SKIN_VERSION="1.7"
+SKIN_EXT="bz2"
+SKIN_SRC=${PACKAGE_SKIN:=$SKIN-$SKIN_VERSION.tar.$SKIN_EXT}
+SKIN_URL="http://www.mplayerhq.hu/MPlayer/skins/$SKIN_SRC"
+
+if [ ! -s "$SRC_DIR/$SKIN_SRC" ] || ! bunzip2 -t "$SRC_DIR/$SKIN_SRC" 2> /dev/null; then
+ wget "$SKIN_URL" -O "$SRC_DIR/$SKIN_SRC" || exit $ERROR_WGET
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches=" [[PATCH URLS]]
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ patch="`basename $patch`"
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$SRC_DIR/$patch" ]; then
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ fi
+done
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Skin installation
+SKIN_DIR=${SKIN_DIR:=$PKG/usr/share/mplayer/skins}
+mkdir -p $SKIN_DIR
+tar jxvf $SRC_DIR/$SKIN_SRC -C $SKIN_DIR
+mv $SKIN_DIR/$SKIN $SKIN_DIR/default
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS ChangeLog Copyright DOCS LICENSE README TOOLS"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------|
+MPlayer: MPlayer (A Movie Player)
+MPlayer:
+MPlayer: MPlayer is a movie and animation player that supports a wide range
+MPlayer: of codecs and file formats, including MPEG 1/2/4, DivX 3/4/5, Windows
+MPlayer: Media 7/8/9, RealAudio/Video up to 9, Quicktime 5/6, and Vivo 1/2.
+MPlayer: It has many MMX/SSE(2)/3Dnow(Ex) optimized native audio and video
+MPlayer: codecs, but allows using XAnim's and RealPlayer's binary codec plugins,
+MPlayer: and Win32 codec DLLs. It has basic VCD/DVD playback functionality,
+MPlayer: including DVD subtitles, but supports many text-based subtitle formats
+MPlayer: too. For video output, nearly every existing interface is supported.
+MPlayer:
+EODESC
+
+# Copy slack-required
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+if [ -f "$CWD/slack-required" ]; then
+ cp $CWD/slack-required $PKG/install
+fi
+
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/media/video/mplayer/slack-required b/media/video/mplayer/slack-required
index 102254b8..5a421f7f 100644
--- a/media/video/mplayer/slack-required
+++ b/media/video/mplayer/slack-required
@@ -1,4 +1,4 @@
-# Dependency list to MPlayer
+# Dependency list to mplayer-export
#
# dependency [condition] [version]]
speex