wok rev 11325

get-flash-plugin: Update to work with new firefox.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Nov 17 13:38:50 2011 +0000 (2011-11-17)
parents 66be26816f41
children f04c3a68b778
files get-flash-plugin/receipt get-flash-plugin/stuff/get-flash-plugin
line diff
     1.1 --- a/get-flash-plugin/receipt	Thu Nov 17 13:37:18 2011 +0000
     1.2 +++ b/get-flash-plugin/receipt	Thu Nov 17 13:38:50 2011 +0000
     1.3 @@ -13,6 +13,6 @@
     1.4  genpkg_rules()
     1.5  {
     1.6  	mkdir -p $fs/usr/bin
     1.7 -	cp stuff/get-flash-plugin $fs/usr/bin
     1.8 +	cp $stuff/get-flash-plugin $fs/usr/bin
     1.9  }
    1.10  
     2.1 --- a/get-flash-plugin/stuff/get-flash-plugin	Thu Nov 17 13:37:18 2011 +0000
     2.2 +++ b/get-flash-plugin/stuff/get-flash-plugin	Thu Nov 17 13:38:50 2011 +0000
     2.3 @@ -1,6 +1,8 @@
     2.4  #!/bin/sh -e
     2.5  : ${DIALOG=tazdialog}
     2.6  
     2.7 +. /etc/slitaz/slitaz.conf
     2.8 +
     2.9  ROOT="$1"
    2.10  
    2.11  if test $(id -u) != 0 ; then
    2.12 @@ -9,10 +11,11 @@
    2.13  	exit 0
    2.14  fi
    2.15  
    2.16 -if [ -d $ROOT/var/lib/tazpkg/installed/flash-plugin ]; then
    2.17 +PACKAGE="flash-plugin"
    2.18 +if [ -d ${ROOT}${INSTALLED}/$PACKAGE ]; then
    2.19    [ -n "$ROOT" ] && exit 1
    2.20 -  tazpkg remove flash-plugin
    2.21 -  [ -d /var/lib/tazpkg/installed/flash-plugin ] && exit 1
    2.22 +  tazpkg remove $PACKAGE
    2.23 +  [ -d $INSTALLED/$PACKAGE ] && exit 1
    2.24  fi
    2.25  WEB_SITE="http://www.adobe.com/products/flash/"
    2.26  URL="http://fpdownload.macromedia.com/get/flashplayer/current/"
    2.27 @@ -63,20 +66,20 @@
    2.28  # Install files
    2.29  chmod 755 libflashplayer.so
    2.30  chown root.root libflashplayer.so
    2.31 -dir=flash-plugin-$VERSION/fs/usr/share/flash
    2.32 +dir=$PACKAGE-$VERSION/fs/usr/share/flash
    2.33  mkdir -p $dir
    2.34  mv libflashplayer.so $dir
    2.35  
    2.36  # Sanity Check: Reexport firefox libraries if they don't exist
    2.37 -dir=flash-plugin-$VERSION/fs/usr/lib
    2.38 +dir=$PACKAGE-$VERSION/fs/usr/lib
    2.39  mkdir -p $dir
    2.40 -for i in /usr/lib/firefox*/*.so ; do
    2.41 +for i in /usr/lib/firefox/*.so ; do
    2.42    	[ -f $i ] && [ -z "`ls /usr/lib/$(basename $i)`" ] && ln -s $i $dir	
    2.43  done
    2.44  
    2.45  # Create pseudo package
    2.46 -cat > flash-plugin-$VERSION/receipt <<EOT
    2.47 -PACKAGE="flash-plugin"
    2.48 +cat > $PACKAGE-$VERSION/receipt <<EOT
    2.49 +PACKAGE="$PACKAGE"
    2.50  VERSION="$VERSION"
    2.51  CATEGORY="non-free"
    2.52  SHORT_DESC="Adobe Flash Player."
    2.53 @@ -89,8 +92,8 @@
    2.54  post_install()
    2.55  {
    2.56  	echo -n "Processing post install commands..."
    2.57 -	if [ -d \$1/var/lib/tazpkg/installed/firefox ] ; then
    2.58 -		ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/firefox*/plugins
    2.59 +	if [ -d \$1/$INSTALLED/firefox ] ; then
    2.60 +		ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/firefox/plugins
    2.61  	fi	 
    2.62  	mkdir -p \$1/usr/lib/mozilla/plugins
    2.63  	ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/mozilla/plugins
    2.64 @@ -100,8 +103,8 @@
    2.65  post_remove()
    2.66  {
    2.67  	echo -n "Processing post remove commands..."
    2.68 -	if [ -d /var/lib/tazpkg/installed/firefox ] ; then
    2.69 -		rm -f /usr/lib/firefox*/plugins/libflashplayer.so
    2.70 +	if [ -d $INSTALLED/firefox ] ; then
    2.71 +		rm -f /usr/lib/firefox/plugins/libflashplayer.so
    2.72  	fi
    2.73  	rm -f /usr/lib/mozilla/plugins/libflashplayer.so
    2.74  	status
    2.75 @@ -109,10 +112,10 @@
    2.76  EOT
    2.77  
    2.78  # Pack
    2.79 -tazpkg pack flash-plugin-$VERSION
    2.80 +tazpkg pack $PACKAGE-$VERSION
    2.81  
    2.82  # Install pseudo package
    2.83 -tazpkg install flash-plugin-$VERSION.tazpkg --root=$ROOT
    2.84 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    2.85  cd ..
    2.86  
    2.87  # Clean