wok diff get-flash-plugin/stuff/get-flash-plugin @ 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 5f75424c73c6
children 43ed4e348b0d
line diff
     1.1 --- a/get-flash-plugin/stuff/get-flash-plugin	Thu Mar 17 16:20:37 2011 +0100
     1.2 +++ b/get-flash-plugin/stuff/get-flash-plugin	Thu Nov 17 13:38:50 2011 +0000
     1.3 @@ -1,6 +1,8 @@
     1.4  #!/bin/sh -e
     1.5  : ${DIALOG=tazdialog}
     1.6  
     1.7 +. /etc/slitaz/slitaz.conf
     1.8 +
     1.9  ROOT="$1"
    1.10  
    1.11  if test $(id -u) != 0 ; then
    1.12 @@ -9,10 +11,11 @@
    1.13  	exit 0
    1.14  fi
    1.15  
    1.16 -if [ -d $ROOT/var/lib/tazpkg/installed/flash-plugin ]; then
    1.17 +PACKAGE="flash-plugin"
    1.18 +if [ -d ${ROOT}${INSTALLED}/$PACKAGE ]; then
    1.19    [ -n "$ROOT" ] && exit 1
    1.20 -  tazpkg remove flash-plugin
    1.21 -  [ -d /var/lib/tazpkg/installed/flash-plugin ] && exit 1
    1.22 +  tazpkg remove $PACKAGE
    1.23 +  [ -d $INSTALLED/$PACKAGE ] && exit 1
    1.24  fi
    1.25  WEB_SITE="http://www.adobe.com/products/flash/"
    1.26  URL="http://fpdownload.macromedia.com/get/flashplayer/current/"
    1.27 @@ -63,20 +66,20 @@
    1.28  # Install files
    1.29  chmod 755 libflashplayer.so
    1.30  chown root.root libflashplayer.so
    1.31 -dir=flash-plugin-$VERSION/fs/usr/share/flash
    1.32 +dir=$PACKAGE-$VERSION/fs/usr/share/flash
    1.33  mkdir -p $dir
    1.34  mv libflashplayer.so $dir
    1.35  
    1.36  # Sanity Check: Reexport firefox libraries if they don't exist
    1.37 -dir=flash-plugin-$VERSION/fs/usr/lib
    1.38 +dir=$PACKAGE-$VERSION/fs/usr/lib
    1.39  mkdir -p $dir
    1.40 -for i in /usr/lib/firefox*/*.so ; do
    1.41 +for i in /usr/lib/firefox/*.so ; do
    1.42    	[ -f $i ] && [ -z "`ls /usr/lib/$(basename $i)`" ] && ln -s $i $dir	
    1.43  done
    1.44  
    1.45  # Create pseudo package
    1.46 -cat > flash-plugin-$VERSION/receipt <<EOT
    1.47 -PACKAGE="flash-plugin"
    1.48 +cat > $PACKAGE-$VERSION/receipt <<EOT
    1.49 +PACKAGE="$PACKAGE"
    1.50  VERSION="$VERSION"
    1.51  CATEGORY="non-free"
    1.52  SHORT_DESC="Adobe Flash Player."
    1.53 @@ -89,8 +92,8 @@
    1.54  post_install()
    1.55  {
    1.56  	echo -n "Processing post install commands..."
    1.57 -	if [ -d \$1/var/lib/tazpkg/installed/firefox ] ; then
    1.58 -		ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/firefox*/plugins
    1.59 +	if [ -d \$1/$INSTALLED/firefox ] ; then
    1.60 +		ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/firefox/plugins
    1.61  	fi	 
    1.62  	mkdir -p \$1/usr/lib/mozilla/plugins
    1.63  	ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/mozilla/plugins
    1.64 @@ -100,8 +103,8 @@
    1.65  post_remove()
    1.66  {
    1.67  	echo -n "Processing post remove commands..."
    1.68 -	if [ -d /var/lib/tazpkg/installed/firefox ] ; then
    1.69 -		rm -f /usr/lib/firefox*/plugins/libflashplayer.so
    1.70 +	if [ -d $INSTALLED/firefox ] ; then
    1.71 +		rm -f /usr/lib/firefox/plugins/libflashplayer.so
    1.72  	fi
    1.73  	rm -f /usr/lib/mozilla/plugins/libflashplayer.so
    1.74  	status
    1.75 @@ -109,10 +112,10 @@
    1.76  EOT
    1.77  
    1.78  # Pack
    1.79 -tazpkg pack flash-plugin-$VERSION
    1.80 +tazpkg pack $PACKAGE-$VERSION
    1.81  
    1.82  # Install pseudo package
    1.83 -tazpkg install flash-plugin-$VERSION.tazpkg --root=$ROOT
    1.84 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    1.85  cd ..
    1.86  
    1.87  # Clean