wok-next view mplayerplug-in/receipt @ rev 11675
Up slitaz-tools-boxes (4.5)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 18 09:21:57 2012 +0100 (2012-02-18) |
parents | 8e4c74abdf74 |
children | 9602efab8068 |
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-gtk2 \
46 --enable-wmp \
47 --enable-qt \
48 --enable-rm \
49 --enable-dvx \
50 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
51 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
52 make $MAKEFLAGS &&
53 make DESTDIR=$DESTDIR install
54 }
56 genpkg_rules()
57 {
58 mkdir -p $fs/usr/lib
59 cp -a $_pkg/etc $fs
60 cp -a $_pkg/usr/lib/mozilla $fs/usr/lib
61 # change the default video output to xv,x11
62 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
64 }
66 post_install()
67 {
68 echo -n "Processing post install commands..."
69 local root
70 root=$1
71 get_firefox_version $1
72 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
73 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
74 done
75 status
76 }
78 post_remove()
79 {
80 echo -n "Processing post remove commands..."
81 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
82 status
83 }