wok-next view mplayerplug-in/receipt @ rev 20454
Choose between libpng16 and libpng12
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Feb 28 17:32:31 2018 +0200 (2018-02-28) |
parents | ed8073aa8cf0 |
children | 757d032c55c7 |
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 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
67 }
69 post_install()
70 {
71 get_firefox_version "$1"
72 cd "$1/"
73 for i in usr/lib/mozilla/plugins/$PACKAGE*.so ; do
74 ln -s "/$i" "$1/usr/lib/firefox-$FIREFOX_VER/plugins"
75 done
76 }
78 post_remove()
79 {
80 rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
81 }