aboutsummaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-10-13 14:56:41 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-10-13 14:56:41 +0000
commitd3ed47de73b492065bb53a679c77f445af46eb13 (patch)
tree25e406a06fd26bfd90acadd0e17dcc1596c51ce4 /media
parent58cc0c01e8ff9c47d52c047707e854df2be4e92f (diff)
downloadslackbuilds-d3ed47de73b492065bb53a679c77f445af46eb13.tar.gz
slackbuilds-d3ed47de73b492065bb53a679c77f445af46eb13.tar.bz2
mplayerplug-in: adding mplayerplug-in
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2264 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media')
-rw-r--r--media/video/mplayerplug-in/Manifest24
-rw-r--r--media/video/mplayerplug-in/mplayerplug-in.SlackBuild271
-rw-r--r--media/video/mplayerplug-in/slack-required4
3 files changed, 299 insertions, 0 deletions
diff --git a/media/video/mplayerplug-in/Manifest b/media/video/mplayerplug-in/Manifest
new file mode 100644
index 00000000..6e0e9f55
--- /dev/null
+++ b/media/video/mplayerplug-in/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST mplayerplug-in-3.55.tar.gz 281845 MD5 cb59d32221cfbd04b6a8b3bb55593484 RMD160 e01224b14883a93211745be0a329a3f524f39d8c SHA1 69726d4e16523b1a39c284efee081c31b0ea7f7f SHA256 ba5affde4c5d5a89c8bf987ae9326daabbf8ea8279fccd589474e5157fc67b7e SHA512 5b131f52dc24e19f46bc41be23b4d0cd15347e598d674fcc7719adace77c0421818c6d16ad4508fee08401094a1af2987c91923f73d58c4c5b3399908b709eec
+MKBUILD mplayerplug-in.mkbuild 5067 MD5 4147b8cefb4c520c3f4c548d8e78fc63 RMD160 d552639b70c51fd32e1ca594e2725b90f31ab000 SHA1 e28bc5b1549ff2cbf5a5ee939e5143db8c821f45 SHA256 79f41364c2be99a1723856add8cda2adeeb8c73963c36cfede26d2bbe12f4a56 SHA512 be8b743d7a8a777e90b0b3d2d04c89012e77fc961f8a6f00d6efe90923e40d60b9ff9bf8f8a29275c1b9408ecbfb8aaf2ac65da8b4495b326c5f18e45ffc791f
+SLACK-REQUIRED slack-required 86 MD5 62b17b99aa17172287a5a5fdcdcbef21 RMD160 5fe10ba843efb6fc2d7e09fb8c49c5c451dafa11 SHA1 142a6d5693a59bef1137ae29b3adc784f266bd72 SHA256 b36b587fa37a941f715accfaa9776c1f55d2d8ef424f4896a34d7bc1492e0145 SHA512 464795fc1d12706a61f5e1fa377f098255da366505b21e1635aa48f1a0e5698a953342fb44a2040f0780ba18f027446ed0642c5cf6aa840170062790701c0634
+SLACKBUILD mplayerplug-in.SlackBuild 8275 MD5 486d2fa297c2c3d24753367ca2ab3950 RMD160 d658b905fd850e51790e8c80fdda10b79153af7a SHA1 768a0ebd70bf6508401afc42778b68c484033b84 SHA256 4f3283e5b4caa9c6be1b905dbca9c55a5521575c3fe9d93323432d7c14b62d5d SHA512 ff56debb77510abfbd2b138e6cc839457de87f9212c5f8725a1bd733041678a6a8d774fc320e3a6d9c7e4ffab81d9c41f0e72a54ef933ae06bb7809745204e65
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJK1JQOAAoJEEHL93ESzgeirpsP/2Z1R/G7N4jNZ2awXw1vYiBo
+mXxUN54Wwdpnc/4+4t05TQDFNvMq39sdLZayqHFng0AdHjevK9RaH6vVze/7JYao
+zLhfh0uFLwGkX2Szh2GQAG29H+tsxZrogTLvMy+ofPmoBuV3nJlT/rB3gLg/5EEW
+Rul7v4pzIyBn+7GjK7aohcLXtiOPpm9xoNY2WIp0DE2k0kgb8+zjs4TrUGZ8P1bI
+9Qw2W71++6UkSUPgPlNaye/lstbftKPBzgB2d9ZrMEVbkW5Z+rW0h7/L7CBn2zx7
+lH/4yrvb8HP6bxkffBJToCqSwtR6CXgLRQrNZOPVTR7O3/45/WfNdviADblu1uMc
+tgBCMkAf26D9hZzQxkaVA0l6OiVe4Wf00vP+iogbVcwq/6c0arGeFRBcr/VYpEo+
+OGgyjnJ6sYsQky1CVdj8n+20QBBEULp7aF5v2f7MH35aIrOkqsvofyba5y0jOuCs
+fbb73rSoQu9hHwP2GKVaoDOqoha5if/5FqIycQmpWLnTGiE/9R+EmWhdWXOp6SXF
+gq+HckoTvZy7jUoe9rR+UtfYMq3mrG+70Kw3mMNpi6i5GIIKOp8Hu3v1dzKyerUa
+07AOHyCZdl05GvRJ5Vi9C8mTACnFuvhuE4IH+yUkJeKnh+R7WuDL+yjDfavdKHQX
+tnwWlDYt9JScniyyzQ5V
+=m7nK
+-----END PGP SIGNATURE-----
diff --git a/media/video/mplayerplug-in/mplayerplug-in.SlackBuild b/media/video/mplayerplug-in/mplayerplug-in.SlackBuild
new file mode 100644
index 00000000..6cf7d6bb
--- /dev/null
+++ b/media/video/mplayerplug-in/mplayerplug-in.SlackBuild
@@ -0,0 +1,271 @@
+#!/bin/bash
+#
+# mplayerplug-in.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.
+#
+# mplayerplug-in.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 mplayerplug-in, by Alexandre Vieira de Souza
+# requires:
+# tested: mplayerplug-in-3.55
+# model: generic.mkSlackBuild $Rev: 822 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="mplayerplug-in"
+PKG_NAME="mplayerplug-in"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=3.55}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1avs}
+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/mplayerplug-in"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+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.gz"
+URL="http://downloads.sourceforge.net/mplayerplug-in/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+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"
+
+# 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
+
+# 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="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+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-----------------------------------------------|
+mplayerplug: mplayerplug
+mplayerplug:
+mplayerplug: mplayerplug-in is a browser plugin that uses
+mplayerplug: mplayer to play videos un your browser.
+mplayerplug:
+mplayerplug:
+mplayerplug:
+mplayerplug:
+mplayerplug:
+mplayerplug: by xdoctor
+mplayerplug:
+EODESC
+
+# Move config files to .new to avoid overwriting any system config
+for config_file in etc/mplayerplug-in.conf etc/mplayerplug-in.types; do
+ mv $PKG/$config_file $PKG/$config_file.new
+done
+
+# Add a post-installation script (doinst.sh)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EOSCRIPT > "$PKG/install/doinst.sh"
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)"
+
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+mkgroup() {
+ GROUP="\$1"
+ if ! grep -qe "^\$GROUP:" etc/group; then
+ echo Creating group \$GROUP...
+ chroot . /usr/sbin/groupadd \$GROUP
+ fi
+}
+
+mkuser() {
+ USER="\$1"
+ if [ ! -z "\$2" ]; then
+ GROUP="\$2"
+ else
+ GROUP="\$USER"
+ fi
+ if ! grep -qe "^\$USER:" etc/passwd; then
+ echo Creating user \$USER...
+ chroot . /usr/sbin/useradd \$USER -g \$GROUP
+ fi
+}
+
+config etc/mplayerplug-in.conf.new ; config etc/mplayerplug-in.types.new
+EOSCRIPT
+
+# 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/mplayerplug-in/slack-required b/media/video/mplayerplug-in/slack-required
new file mode 100644
index 00000000..9769606d
--- /dev/null
+++ b/media/video/mplayerplug-in/slack-required
@@ -0,0 +1,4 @@
+# Dependency list to mplayerplug-in
+#
+# dependency [condition] [version]]
+MPlayer