wok view mplayerplug-in/receipt @ rev 7449

mplayerplug-in: partial fix for compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 30 13:09:45 2010 +0100 (2010-11-30)
parents e318c7e83860
children 268a12c60315
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 cp ../stuff/slitaz-hack.h include
27 grep -q slitaz-hack include/npplat.h || sed -i \
28 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \
29 include/npplat.h
30 while read file; do
31 [ -f done.$file ] && continue
32 echo "Apply $file..."
33 patch -p1 < ../stuff/$PACKAGE-$VERSION-$file || return 1
34 touch done.$file
35 done <<EOT
36 glibc210.u
37 EOT
38 make distclean
39 touch install.sh
40 get_firefox_version
41 ./configure --prefix=/usr --sysconfdir=/etc \
42 --enable-gtk2 \
43 --enable-wmp \
44 --enable-qt \
45 --enable-rm \
46 --enable-dvx \
47 MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
48 GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
49 make -j 4 &&
50 make DESTDIR=$PWD/_pkg install
51 }
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr/lib
56 cp -a $_pkg/etc $fs
57 cp -a $_pkg/usr/lib/mozilla $fs/usr/lib
58 # change the default video output to xv,x11
59 sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
61 }
63 post_install()
64 {
65 echo -n "Processing post install commands..."
66 local root
67 root=$1
68 get_firefox_version $1
69 for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
70 ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
71 done
72 status
73 }
75 post_remove()
76 {
77 echo -n "Processing post remove commands..."
78 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
79 status
80 }