wok-stable annotate mplayerplug-in/receipt @ rev 7316
Up: assaultcube to 1.10.4. Up: assaultcube-data to 1.10.4.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Nov 17 17:55:22 2010 +0000 (2010-11-17) |
parents | bb20381d90dc |
children | a527a7e82b76 |
rev | line source |
---|---|
jozee@3127 | 1 # SliTaz package receipt. |
jozee@3127 | 2 |
jozee@3127 | 3 PACKAGE="mplayerplug-in" |
jozee@3127 | 4 VERSION="3.55" |
jozee@3127 | 5 CATEGORY="multimedia" |
jozee@3127 | 6 SHORT_DESC="a browser plugin that uses mplayer to play videos from websites" |
jozee@3127 | 7 MAINTAINER="jozee@slitaz.org" |
slaxemulator@7140 | 8 DEPENDS="mplayer xorg-libXpm gtk+ gcc-lib-base" |
slaxemulator@7140 | 9 BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext" |
jozee@3127 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
jozee@3127 | 11 WEB_SITE="http://mplayerplug-in.sourceforge.net/" |
jozee@3127 | 12 WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL" |
jozee@3410 | 13 TAGS="player audio video browser" |
pascal@7143 | 14 |
pascal@7143 | 15 get_firefox_version() |
pascal@7143 | 16 { |
pascal@7143 | 17 FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \ |
pascal@7143 | 18 grep VERSION= | cut -d \" -f 2` |
pascal@7143 | 19 } |
jozee@3127 | 20 |
jozee@3127 | 21 # Rules to configure and make the package. |
jozee@3127 | 22 compile_rules() |
jozee@3127 | 23 { |
jozee@3127 | 24 cd $src |
pascal@4526 | 25 cp ../stuff/slitaz-hack.h include |
pascal@4526 | 26 grep -q slitaz-hack include/npplat.h || sed -i \ |
pascal@4526 | 27 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \ |
pascal@4526 | 28 include/npplat.h |
pascal@4526 | 29 while read file; do |
pascal@4526 | 30 [ -f done.$file ] && continue |
pascal@4526 | 31 echo "Apply $file..." |
pascal@4526 | 32 patch -p1 < ../stuff/$PACKAGE-$VERSION-$file || return 1 |
pascal@4526 | 33 touch done.$file |
pascal@4526 | 34 done <<EOT |
jozee@3410 | 35 glibc210.u |
jozee@3410 | 36 EOT |
pascal@4526 | 37 make distclean |
jozee@3410 | 38 touch install.sh |
pascal@7143 | 39 get_firefox_version |
jozee@3127 | 40 ./configure --prefix=/usr --sysconfdir=/etc \ |
jozee@3127 | 41 --enable-gtk2 \ |
jozee@3127 | 42 --enable-wmp \ |
jozee@3127 | 43 --enable-qt \ |
jozee@3127 | 44 --enable-rm \ |
jozee@3127 | 45 --enable-dvx \ |
jozee@3127 | 46 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \ |
pascal@4526 | 47 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER/stable" && |
pascal@5783 | 48 make -j 4 && |
jozee@3127 | 49 make DESTDIR=$PWD/_pkg install |
jozee@3127 | 50 } |
jozee@3127 | 51 |
jozee@3127 | 52 genpkg_rules() |
jozee@3127 | 53 { |
jozee@3410 | 54 mkdir -p $fs/usr/lib |
pascal@4526 | 55 cp -a $_pkg/etc $fs |
pascal@4526 | 56 cp -a $_pkg/usr/lib/mozilla $fs/usr/lib |
jozee@3410 | 57 # change the default video output to xv,x11 |
jozee@3410 | 58 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf |
jozee@3410 | 59 |
jozee@3127 | 60 } |
jozee@3410 | 61 |
jozee@3410 | 62 post_install() |
jozee@3410 | 63 { |
jozee@3410 | 64 echo -n "Processing post install commands..." |
jozee@3410 | 65 local root |
jozee@3410 | 66 root=$1 |
pascal@7143 | 67 get_firefox_version $1 |
jozee@3410 | 68 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do |
jozee@3410 | 69 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins |
jozee@3410 | 70 done |
jozee@3410 | 71 status |
jozee@3410 | 72 } |
jozee@3410 | 73 |
jozee@3410 | 74 post_remove() |
jozee@3410 | 75 { |
jozee@3410 | 76 echo -n "Processing post remove commands..." |
jozee@3410 | 77 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so |
jozee@3410 | 78 status |
jozee@3410 | 79 } |
jozee@3410 | 80 |