#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://mplayerplug-in.sourceforge.net # Package by Andrea Sciucca (gohanz at infinito.it ) # http://www.slacky.eu # Requirements: Mplayer # MplayerPlugin-Opera Browser Build. CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package NAME=mplayerplug-in VERSION=3.50 CHOST=i486 ARCH=${ARCH:-i686} BUILD=2as SOURCE=http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz echo -e "\E[0;32m+--------------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild $NAME-$VERSION |\E[0;0m" echo -e "\E[0;32m+--------------------------------------+\E[0;0m" cd $NAME find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --enable-x \ --enable-wmp \ --enable-qt \ --enable-gmp \ --enable-dvx \ --with-mozilla-home=/usr/lib/seamonkey \ --program-prefix="" \ --program-suffix="" \ $CHOST-slackware-linux sed -i "s|LDFLAGS= -L/usr/X11R6/lib -lX11 -lSM -lICE -lXext -lX11 -lXpm -lXt|LDFLAGS= -L/usr/X11R6/lib -lX11 -lSM -lICE -lXext -lX11 -lXpm -lXt -L/usr/lib/seamonkey -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl|g" Makefile ln -s /usr/lib/seamonkey/libxpcom_core.so /usr/lib ln -s /usr/lib/seamonkey/libxpcom.so /usr/lib make mkdir -p $PKG/usr/lib/opera/plugins mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a ChangeLog INSTALL Source README TODO LICENSE $PKG/usr/doc/$NAME-$VERSION cp -a mplayerplug-in*.so $PKG/usr/lib/opera/plugins cp -a mplayerplug-in*xpt $PKG/usr/lib/opera/plugins mkdir -p $PKG/etc cp -a mplayerplug-in.conf $PKG/etc/mplayerplug-in.conf.new cp -a mplayerplug-in.types $PKG/etc cd po make install DESTDIR=$PKG mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/opera_mplayerplug-in.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/opera_mplayerplug-in.SlackBuild ( 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 find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null ) cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/opera_mplayerplug-in-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi