wok view mplayerplug-in/receipt @ rev 17413

trickle: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 29 13:37:18 2014 +0100 (2014-11-29)
parents 531807aaf860
children 9e01bc6321ea
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 LICENSE="GPL"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://mplayerplug-in.sourceforge.net/"
11 WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL"
12 TAGS="player audio video browser"
14 DEPENDS="mplayer xorg-libXpm gtk+ gcc-lib-base"
15 BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext \
16 nspr-dev"
18 get_firefox_version()
19 {
20 FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \
21 grep VERSION= | cut -d \" -f 2`
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 sed -i 's/npupp\.h/npfunctions.h/' */np*
29 sed -i 's|char [\* ]*NP*_GetMIMEDescription(|const &|' \
30 plugingate/np_entry.cpp Source/plugin.cpp
31 cp $stuff/slitaz-hack.h include
32 grep -q slitaz-hack include/npplat.h || sed -i \
33 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \
34 include/npplat.h
35 while read file; do
36 [ -f done.$file ] && continue
37 echo "Apply $file..."
38 patch -p1 < $stuff/$PACKAGE-$VERSION-$file || return 1
39 touch done.$file
40 done <<EOT
41 glibc210.u
42 static-iid-accessor.u
43 EOT
44 make distclean
45 touch install.sh
46 get_firefox_version
47 ./configure --prefix=/usr --sysconfdir=/etc \
48 --enable-x \
49 --enable-wmp \
50 --enable-qt \
51 --enable-rm \
52 --enable-dvx \
53 CFLAGS="$CFLAGS -I/usr/include/nspr" \
54 GECKO_XPIDL="$stuff/xpidl" \
55 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
56 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
57 make $MAKEFLAGS &&
58 make DESTDIR=$DESTDIR install
59 }
61 genpkg_rules()
62 {
63 mkdir -p $fs/usr/lib
64 cp -a $install/etc $fs
65 cp -a $install/usr/lib/mozilla $fs/usr/lib
66 # change the default video output to xv,x11
67 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
69 }
71 post_install()
72 {
73 echo -n "Processing post install commands..."
74 local root
75 root=$1
76 get_firefox_version $1
77 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
78 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
79 done
80 status
81 }
83 post_remove()
84 {
85 echo -n "Processing post remove commands..."
86 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
87 status
88 }