wok-current annotate mplayerplug-in/receipt @ rev 12634

e2fsprogs, fsarchiver, laptop-mode-tools, nfs-utils: s/util-linux-ng/util-linux/
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 29 13:18:44 2012 +0200 (2012-04-29)
parents 9602efab8068
children 531807aaf860
rev   line source
pascal@11239 1 # SliTaz package receipt.
pascal@11239 2
pascal@11239 3 PACKAGE="mplayerplug-in"
pascal@11239 4 VERSION="3.55"
pascal@11239 5 CATEGORY="multimedia"
pascal@11239 6 SHORT_DESC="a browser plugin that uses mplayer to play videos from websites"
pascal@11239 7 MAINTAINER="jozee@slitaz.org"
pascal@11239 8 DEPENDS="mplayer xorg-libXpm gtk+ gcc-lib-base"
pascal@11239 9 BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext"
pascal@11239 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@11239 11 WEB_SITE="http://mplayerplug-in.sourceforge.net/"
pascal@11239 12 WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL"
pascal@11239 13 TAGS="player audio video browser"
pascal@11239 14
pascal@11239 15 get_firefox_version()
pascal@11239 16 {
pascal@11239 17 FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \
pascal@11239 18 grep VERSION= | cut -d \" -f 2`
pascal@11239 19 }
pascal@11239 20
pascal@11239 21 # Rules to configure and make the package.
pascal@11239 22 compile_rules()
pascal@11239 23 {
pascal@11239 24 cd $src
pascal@11239 25 sed -i 's/npupp\.h/npfunctions.h/' */np*
pascal@11586 26 sed -i 's|char [\* ]*NP*_GetMIMEDescription(|const &|' \
pascal@11586 27 plugingate/np_entry.cpp Source/plugin.cpp
pascal@11239 28 cp $stuff/slitaz-hack.h include
pascal@11239 29 grep -q slitaz-hack include/npplat.h || sed -i \
pascal@11239 30 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \
pascal@11239 31 include/npplat.h
pascal@11239 32 while read file; do
pascal@11239 33 [ -f done.$file ] && continue
pascal@11239 34 echo "Apply $file..."
pascal@11239 35 patch -p1 < $stuff/$PACKAGE-$VERSION-$file || return 1
pascal@11239 36 touch done.$file
pascal@11239 37 done <<EOT
pascal@11239 38 glibc210.u
pascal@11239 39 static-iid-accessor.u
pascal@11239 40 EOT
pascal@11239 41 make distclean
pascal@11239 42 touch install.sh
pascal@11239 43 get_firefox_version
pascal@11239 44 ./configure --prefix=/usr --sysconfdir=/etc \
samuel_trassare@11954 45 --enable-x \
pascal@11239 46 --enable-wmp \
pascal@11239 47 --enable-qt \
pascal@11239 48 --enable-rm \
pascal@11239 49 --enable-dvx \
pascal@11964 50 GECKO_XPIDL="$stuff/xpidl" \
pascal@11239 51 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
pascal@11239 52 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
gokhlayeh@11574 53 make $MAKEFLAGS &&
pascal@11239 54 make DESTDIR=$DESTDIR install
pascal@11239 55 }
pascal@11239 56
pascal@11239 57 genpkg_rules()
pascal@11239 58 {
pascal@11239 59 mkdir -p $fs/usr/lib
pascal@11239 60 cp -a $_pkg/etc $fs
pascal@11239 61 cp -a $_pkg/usr/lib/mozilla $fs/usr/lib
pascal@11239 62 # change the default video output to xv,x11
pascal@11239 63 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
pascal@11239 64
pascal@11239 65 }
pascal@11239 66
pascal@11239 67 post_install()
pascal@11239 68 {
pascal@11239 69 echo -n "Processing post install commands..."
pascal@11239 70 local root
pascal@11239 71 root=$1
pascal@11239 72 get_firefox_version $1
pascal@11239 73 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
pascal@11239 74 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
pascal@11239 75 done
pascal@11239 76 status
pascal@11239 77 }
pascal@11239 78
pascal@11239 79 post_remove()
pascal@11239 80 {
pascal@11239 81 echo -n "Processing post remove commands..."
pascal@11239 82 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
pascal@11239 83 status
pascal@11239 84 }
pascal@11239 85