wok view mplayerplug-in/receipt @ rev 15342

mplayerplug-in, gecko-mediaplayer: add -I/usr/include/nspr
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 29 15:05:37 2013 +0000 (2013-09-29)
parents 7229b146289b
children b4f7117eb98c
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"
17 get_firefox_version()
18 {
19 FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \
20 grep VERSION= | cut -d \" -f 2`
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 sed -i 's/npupp\.h/npfunctions.h/' */np*
28 sed -i 's|char [\* ]*NP*_GetMIMEDescription(|const &|' \
29 plugingate/np_entry.cpp Source/plugin.cpp
30 cp $stuff/slitaz-hack.h include
31 grep -q slitaz-hack include/npplat.h || sed -i \
32 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \
33 include/npplat.h
34 while read file; do
35 [ -f done.$file ] && continue
36 echo "Apply $file..."
37 patch -p1 < $stuff/$PACKAGE-$VERSION-$file || return 1
38 touch done.$file
39 done <<EOT
40 glibc210.u
41 static-iid-accessor.u
42 EOT
43 make distclean
44 touch install.sh
45 get_firefox_version
46 ./configure --prefix=/usr --sysconfdir=/etc \
47 --enable-x \
48 --enable-wmp \
49 --enable-qt \
50 --enable-rm \
51 --enable-dvx \
52 CFLAGS="$CFLAGS -I/usr/include/nspr" \
53 GECKO_XPIDL="$stuff/xpidl" \
54 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
55 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
56 make $MAKEFLAGS &&
57 make DESTDIR=$DESTDIR install
58 }
60 genpkg_rules()
61 {
62 mkdir -p $fs/usr/lib
63 cp -a $install/etc $fs
64 cp -a $install/usr/lib/mozilla $fs/usr/lib
65 # change the default video output to xv,x11
66 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
68 }
70 post_install()
71 {
72 echo -n "Processing post install commands..."
73 local root
74 root=$1
75 get_firefox_version $1
76 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
77 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
78 done
79 status
80 }
82 post_remove()
83 {
84 echo -n "Processing post remove commands..."
85 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
86 status
87 }