wok diff mplayerplug-in/receipt @ rev 11263

Up: dropbear (2011.54)
author Alexander Medvedev <devl547@gmail.com>
date Tue Nov 08 19:18:40 2011 +0000 (2011-11-08)
parents
children 8e4c74abdf74
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mplayerplug-in/receipt	Tue Nov 08 19:18:40 2011 +0000
     1.3 @@ -0,0 +1,82 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="mplayerplug-in"
     1.7 +VERSION="3.55"
     1.8 +CATEGORY="multimedia"
     1.9 +SHORT_DESC="a browser plugin that uses mplayer to play videos from websites"
    1.10 +MAINTAINER="jozee@slitaz.org"
    1.11 +DEPENDS="mplayer xorg-libXpm gtk+ gcc-lib-base"
    1.12 +BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext"
    1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14 +WEB_SITE="http://mplayerplug-in.sourceforge.net/" 
    1.15 +WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL"
    1.16 +TAGS="player audio video browser"
    1.17 +
    1.18 +get_firefox_version()
    1.19 +{
    1.20 +	FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \
    1.21 +			grep VERSION= | cut -d \" -f 2`
    1.22 +}
    1.23 +
    1.24 +# Rules to configure and make the package.
    1.25 +compile_rules()
    1.26 +{
    1.27 +	cd $src
    1.28 +	sed -i 's/npupp\.h/npfunctions.h/' */np*
    1.29 +	cp $stuff/slitaz-hack.h include
    1.30 +	grep -q slitaz-hack include/npplat.h || sed -i \
    1.31 +		's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \
    1.32 +		include/npplat.h
    1.33 +	while read file; do
    1.34 +		[ -f done.$file ] && continue
    1.35 +		echo "Apply $file..."
    1.36 +		patch -p1 < $stuff/$PACKAGE-$VERSION-$file || return 1
    1.37 +		touch done.$file
    1.38 +	done <<EOT
    1.39 +glibc210.u
    1.40 +static-iid-accessor.u
    1.41 +EOT
    1.42 +	make distclean
    1.43 +	touch install.sh
    1.44 +	get_firefox_version
    1.45 +	./configure --prefix=/usr --sysconfdir=/etc \
    1.46 +		--enable-gtk2 \
    1.47 +		--enable-wmp \
    1.48 +		--enable-qt \
    1.49 +		--enable-rm \
    1.50 +		--enable-dvx \
    1.51 +		MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \
    1.52 +		GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" &&
    1.53 +	make -j 4 &&
    1.54 +	make DESTDIR=$DESTDIR install
    1.55 +}
    1.56 +
    1.57 +genpkg_rules()
    1.58 +{
    1.59 +	mkdir -p $fs/usr/lib
    1.60 +	cp -a $_pkg/etc $fs
    1.61 +	cp -a $_pkg/usr/lib/mozilla $fs/usr/lib		
    1.62 +	# change the default video output to xv,x11
    1.63 +	sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
    1.64 +	      
    1.65 +}
    1.66 +
    1.67 +post_install()
    1.68 +{
    1.69 +	echo -n "Processing post install commands..."
    1.70 +	local root
    1.71 +	root=$1
    1.72 +	get_firefox_version $1
    1.73 +	for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
    1.74 +		ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
    1.75 +	done 
    1.76 +	status
    1.77 +}
    1.78 +
    1.79 +post_remove()
    1.80 +{
    1.81 +	echo -n "Processing post remove commands..."
    1.82 +	rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
    1.83 +	status
    1.84 +}
    1.85 +