wok view mplayerplug-in/receipt @ rev 12705

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