wok rev 1713

get-*: add ROOT support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 17 08:50:02 2008 +0000 (2008-11-17)
parents 71793d4be150
children 088ed0a6e9da
files get-OpenOffice3/stuff/get-OpenOffice3 get-b43-firmware/stuff/get-b43-firmware get-b43legacy-firmware/stuff/get-b43legacy-firmware get-eclipse-pdt/stuff/get-eclipse-pdt get-flash-plugin/stuff/get-flash-plugin get-google-earth/stuff/get-google-earth get-ipw2100-firmware/stuff/get-ipw2100-firmware get-ipw2200-firmware/stuff/get-ipw2200-firmware get-java6-jre/stuff/get-java6-jre get-opera/stuff/get-opera get-realplayer/stuff/get-realplayer get-skype/stuff/get-skype get-texlive/stuff/get-texlive get-wifi-firmware/stuff/get-wifi-firmware
line diff
     1.1 --- a/get-OpenOffice3/stuff/get-OpenOffice3	Sun Nov 16 17:23:17 2008 +0000
     1.2 +++ b/get-OpenOffice3/stuff/get-OpenOffice3	Mon Nov 17 08:50:02 2008 +0000
     1.3 @@ -8,6 +8,7 @@
     1.4  PACKAGE="OpenOffice3"
     1.5  VERSION="3.0.0"
     1.6  URL="http://www.openoffice.org"
     1.7 +ROOT="$1"
     1.8  
     1.9  if [ "$LANG" = "fr_FR" ]; then
    1.10  	TARBALL="OOo_${VERSION}_LinuxIntel_install_fr.tar.gz"
    1.11 @@ -49,7 +50,7 @@
    1.12  check_if_installed()
    1.13  {
    1.14  	 # Avoid reinstall
    1.15 -	 if [ -d /var/lib/tazpkg/installed/$PACKAGE ];then
    1.16 +	 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ];then
    1.17  	 	return 0
    1.18  	 else
    1.19  	 	return 1
    1.20 @@ -62,6 +63,7 @@
    1.21  #check if package already installed
    1.22  if (check_if_installed $PACKAGE); then
    1.23  	echo "$PACKAGE is already installed."
    1.24 +	[ -n "$ROOT" ] && exit 0
    1.25  	echo -n "Would you like to remove and reinstall this package [y/n]? "
    1.26  	read answer
    1.27  	case "$answer" in
    1.28 @@ -153,7 +155,7 @@
    1.29  tazpkg pack $PACKAGE-$VERSION
    1.30  
    1.31  # Install pseudo package
    1.32 -tazpkg install $PACKAGE-$VERSION.tazpkg
    1.33 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    1.34  
    1.35  # Clean
    1.36  rm -rf $TEMP_DIR
     2.1 --- a/get-b43-firmware/stuff/get-b43-firmware	Sun Nov 16 17:23:17 2008 +0000
     2.2 +++ b/get-b43-firmware/stuff/get-b43-firmware	Mon Nov 17 08:50:02 2008 +0000
     2.3 @@ -9,6 +9,7 @@
     2.4  VERSION=4.80.53.0
     2.5  TARBALL=$DIR-$VERSION.tar.bz2
     2.6  WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
     2.7 +ROOT="$1"
     2.8  
     2.9  # Check if user is root to install.
    2.10  if test $(id -u) != 0 ; then
    2.11 @@ -18,7 +19,7 @@
    2.12  fi
    2.13  
    2.14  # Avoid reinstall
    2.15 -if [ -d /var/lib/tazpkg/installed/b43-firmware ]; then
    2.16 +if [ -d $ROOT/var/lib/tazpkg/installed/b43-firmware ]; then
    2.17  	echo -e "\nb43-firmware package is already installed.\n"
    2.18  	exit 0
    2.19  fi
    2.20 @@ -47,7 +48,7 @@
    2.21  VERSION="$VERSION"
    2.22  CATEGORY="non-free"
    2.23  SHORT_DESC="Broadcom b43 firmware."
    2.24 -DEPENDS="b43-fwcutter"
    2.25 +DEPENDS="linux-wireless b43-fwcutter wireless_tools"
    2.26  WEB_SITE="http://downloads.openwrt.org/"
    2.27  EOT
    2.28  
    2.29 @@ -55,18 +56,20 @@
    2.30  tazpkg pack b43-firmware-$VERSION
    2.31  
    2.32  # Install pseudo package
    2.33 -tazpkg install b43-firmware-$VERSION.tazpkg
    2.34 +tazpkg install b43-firmware-$VERSION.tazpkg --root=$ROOT
    2.35  
    2.36  # Clean
    2.37  cd /tmp
    2.38  rm -rf $TARBALL $DIR-$VERSION
    2.39  
    2.40  # Load b43 module
    2.41 -echo "Loading module: b43..."
    2.42 -modprobe b43
    2.43 -sleep 1
    2.44 +if [ -z "$ROOT" ]; then
    2.45 +	echo "Loading module: b43..."
    2.46 +	modprobe b43
    2.47 +	sleep 1
    2.48 +fi
    2.49  
    2.50  # Configure /etc/network.conf and start connexion
    2.51 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    2.52 -/etc/init.d/network.sh restart
    2.53 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
    2.54 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
    2.55  
     3.1 --- a/get-b43legacy-firmware/stuff/get-b43legacy-firmware	Sun Nov 16 17:23:17 2008 +0000
     3.2 +++ b/get-b43legacy-firmware/stuff/get-b43legacy-firmware	Mon Nov 17 08:50:02 2008 +0000
     3.3 @@ -9,6 +9,7 @@
     3.4  VERSION=3.130.20.0
     3.5  TARBALL=$DIR-$VERSION.o
     3.6  WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
     3.7 +ROOT="$1"
     3.8  
     3.9  # Check if user is root to install.
    3.10  if test $(id -u) != 0 ; then
    3.11 @@ -18,7 +19,7 @@
    3.12  fi
    3.13  
    3.14  # Avoid reinstall
    3.15 -if [ -d /var/lib/tazpkg/installed/b43legacy-firmware ]; then
    3.16 +if [ -d $ROOT/var/lib/tazpkg/installed/b43legacy-firmware ]; then
    3.17  	echo -e "\nb43legacy-firmware package is already installed.\n"
    3.18  	exit 0
    3.19  fi
    3.20 @@ -47,7 +48,7 @@
    3.21  VERSION="$VERSION"
    3.22  CATEGORY="non-free"
    3.23  SHORT_DESC="Broadcom b43legacy firmware."
    3.24 -DEPENDS="b43-fwcutter"
    3.25 +DEPENDS="linux-wireless b43-fwcutter wireless_tools"
    3.26  WEB_SITE="http://downloads.openwrt.org/"
    3.27  EOT
    3.28  
    3.29 @@ -55,18 +56,20 @@
    3.30  tazpkg pack b43legacy-firmware-$VERSION
    3.31  
    3.32  # Install pseudo package
    3.33 -tazpkg install b43legacy-firmware-$VERSION.tazpkg
    3.34 +tazpkg install b43legacy-firmware-$VERSION.tazpkg --root=$ROOT
    3.35  
    3.36  # Clean
    3.37  cd /tmp
    3.38  rm -rf $TARBALL $DIR-$VERSION
    3.39  
    3.40  # Load b43legacy module
    3.41 -echo "Loading module: b43legacy..."
    3.42 -modprobe b43legacy
    3.43 -sleep 1
    3.44 +if [ -z "$ROOT" ]; then
    3.45 +	echo "Loading module: b43legacy..."
    3.46 +	modprobe b43legacy
    3.47 +	sleep 1
    3.48 +fi
    3.49  
    3.50  # Configure /etc/network.conf and start connexion
    3.51 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    3.52 -/etc/init.d/network.sh restart
    3.53 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
    3.54 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
    3.55  
     4.1 --- a/get-eclipse-pdt/stuff/get-eclipse-pdt	Sun Nov 16 17:23:17 2008 +0000
     4.2 +++ b/get-eclipse-pdt/stuff/get-eclipse-pdt	Mon Nov 17 08:50:02 2008 +0000
     4.3 @@ -13,6 +13,7 @@
     4.4  TEMP_DIR="/home/slitaz/build/$PACKAGE.$$"
     4.5  SOURCE_DIR="/home/slitaz/src"
     4.6  LOG="/tmp/$(basename $0 .sh).log"
     4.7 +ROOT="$1"
     4.8  
     4.9  # Status function with color (supported by Ash).
    4.10  status()
    4.11 @@ -41,7 +42,7 @@
    4.12  check_if_installed()
    4.13  {
    4.14  	 # Avoid reinstall
    4.15 -	 if [ -d /var/lib/tazpkg/installed/$PACKAGE ];then
    4.16 +	 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ];then
    4.17  	 	return 1
    4.18  	 else
    4.19  	 	return 0
    4.20 @@ -54,6 +55,7 @@
    4.21  #check if package already installed
    4.22  if (check_if_installed $PACKAGE); then
    4.23  	echo "$PACKAGE is already installed."
    4.24 +	[ -n "$ROOT" ] && exit 0
    4.25  	echo -n "Would you like to remove and reinstall this package [y/n]? "
    4.26  	read answer
    4.27  	case "$answer" in
    4.28 @@ -129,7 +131,7 @@
    4.29  tazpkg pack $PACKAGE-$VERSION
    4.30  
    4.31  # Install pseudo package
    4.32 -tazpkg install $PACKAGE-$VERSION.tazpkg
    4.33 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    4.34  
    4.35  # Clean
    4.36  rm -rf $TEMP_DIR
     5.1 --- a/get-flash-plugin/stuff/get-flash-plugin	Sun Nov 16 17:23:17 2008 +0000
     5.2 +++ b/get-flash-plugin/stuff/get-flash-plugin	Mon Nov 17 08:50:02 2008 +0000
     5.3 @@ -1,13 +1,16 @@
     5.4  #!/bin/sh -e
     5.5  : ${DIALOG=tazdialog}
     5.6  
     5.7 +ROOT="$1"
     5.8 +
     5.9  if test $(id -u) != 0 ; then
    5.10  	echo -e "\nYou must be root to run `basename $0`."
    5.11  	echo -e "Please type 'su' and root password to become super-user.\n"
    5.12  	exit 0
    5.13  fi
    5.14  
    5.15 -if [ -d /var/lib/tazpkg/installed/flash-plugin ]; then
    5.16 +if [ -d $ROOT/var/lib/tazpkg/installed/flash-plugin ]; then
    5.17 +  [ -n "$ROOT" ] && exit 1
    5.18    tazpkg remove flash-plugin
    5.19    [ -d /var/lib/tazpkg/installed/flash-plugin ] && exit 1
    5.20  fi
    5.21 @@ -18,6 +21,7 @@
    5.22  VERSIONS=""; i=9; while true; do
    5.23    if wget -s ${URL}install_flash_player_${i}_linux.tar.gz 2> /dev/null; then
    5.24      VERSIONS="$VERSIONS $i"
    5.25 +    [ -n "$ROOT" ] && break
    5.26    elif [ -n "$VERSIONS" ]; then
    5.27      break
    5.28    elif [ $i -gt 20 ]; then
    5.29 @@ -52,29 +56,39 @@
    5.30  # Install files
    5.31  chmod 755 libflashplayer.so
    5.32  chown root.root libflashplayer.so
    5.33 -mv libflashplayer.so /usr/lib/firefox*/plugins
    5.34 +dir=flash-plugin-$VERSION/fs/usr/share/flash
    5.35 +mkdir -p $dir
    5.36 +mv libflashplayer.so $dir
    5.37  
    5.38  # Create pseudo package
    5.39 -while read file; do
    5.40 -	dest=flash-plugin-$VERSION/fs$(dirname $file)
    5.41 -	[ -d $dest ] || mkdir -p $dest
    5.42 -	cp -a $file $dest
    5.43 -done <<EOT
    5.44 -$(ls /usr/lib/firefox*/plugins/libflashplayer.so)
    5.45 -EOT
    5.46  cat > flash-plugin-$VERSION/receipt <<EOT
    5.47  PACKAGE="flash-plugin"
    5.48  VERSION="$VERSION"
    5.49  CATEGORY="non-free"
    5.50  SHORT_DESC="Adobe Flash Player."
    5.51  WEB_SITE="$WEB_SITE"
    5.52 +DEPENDS="firefox"
    5.53 +
    5.54 +post_install()
    5.55 +{
    5.56 +	echo -n "Processing post install commands..."
    5.57 +	ln -s /usr/share/flash/libflashplayer.so \$1/usr/lib/firefox*/plugins
    5.58 +	status
    5.59 +}
    5.60 +
    5.61 +post_remove()
    5.62 +{
    5.63 +	echo -n "Processing post remove commands..."
    5.64 +	rm -f /usr/lib/firefox*/plugins/libflashplayer.so
    5.65 +	status
    5.66 +}
    5.67  EOT
    5.68  
    5.69  # Pack
    5.70  tazpkg pack flash-plugin-$VERSION
    5.71  
    5.72  # Install pseudo package
    5.73 -tazpkg install flash-plugin-$VERSION.tazpkg
    5.74 +tazpkg install flash-plugin-$VERSION.tazpkg --root=$ROOT
    5.75  cd ..
    5.76  
    5.77  # Clean
     6.1 --- a/get-google-earth/stuff/get-google-earth	Sun Nov 16 17:23:17 2008 +0000
     6.2 +++ b/get-google-earth/stuff/get-google-earth	Mon Nov 17 08:50:02 2008 +0000
     6.3 @@ -1,6 +1,7 @@
     6.4  #!/bin/sh -e
     6.5  
     6.6  DEPENDS="mesa"
     6.7 +ROOT="$1"
     6.8  
     6.9  if test $(id -u) != 0 ; then
    6.10  	echo -e "\nYou must be root to run `basename $0`."
    6.11 @@ -8,7 +9,8 @@
    6.12  	exit 0
    6.13  fi
    6.14  
    6.15 -if [ -d /var/lib/tazpkg/installed/google-earth ]; then
    6.16 +if [ -d $ROOT/var/lib/tazpkg/installed/google-earth ]; then
    6.17 +  [ -n "$ROOT" ] && exit 1
    6.18    tazpkg remove google-earth
    6.19    [ -d /var/lib/tazpkg/installed/google-earth ] && exit 1
    6.20  fi
    6.21 @@ -56,7 +58,7 @@
    6.22  tazpkg pack google-earth-$VERSION
    6.23  
    6.24  # Install pseudo package
    6.25 -tazpkg install google-earth-$VERSION.tazpkg
    6.26 +tazpkg install google-earth-$VERSION.tazpkg --root=$ROOT
    6.27  
    6.28  # Clean
    6.29  cd $CUR_DIR
     7.1 --- a/get-ipw2100-firmware/stuff/get-ipw2100-firmware	Sun Nov 16 17:23:17 2008 +0000
     7.2 +++ b/get-ipw2100-firmware/stuff/get-ipw2100-firmware	Mon Nov 17 08:50:02 2008 +0000
     7.3 @@ -7,6 +7,7 @@
     7.4  WEB_SITE="http://$MODULE.sourceforge.net/"
     7.5  RPM=$PKG-$VERSION.noarch.rpm
     7.6  WGET_URL="http://dl.atrpms.net/all/$RPM"
     7.7 +ROOT="$1"
     7.8  
     7.9  # Check if user is root to install.
    7.10  if test $(id -u) != 0 ; then
    7.11 @@ -16,19 +17,11 @@
    7.12  fi
    7.13  
    7.14  # Avoid reinstall
    7.15 -if [ -d /var/lib/tazpkg/installed/$PKG ]; then
    7.16 +if [ -d $ROOT/var/lib/tazpkg/installed/$PKG ]; then
    7.17  	echo -e "\n$PKG package is already installed.\n"
    7.18  	exit 0
    7.19  fi
    7.20  
    7.21 -# We need drivers and tools.
    7.22 -for pkg in linux-wireless wireless_tools
    7.23 -do
    7.24 -        if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
    7.25 -		tazpkg get-install $pkg
    7.26 -	fi
    7.27 -done
    7.28 -
    7.29  # Get files
    7.30  TMP=/tmp/$(basename $0)$$
    7.31  mkdir $TMP
    7.32 @@ -49,24 +42,27 @@
    7.33  CATEGORY="non-free"
    7.34  SHORT_DESC="$SHORT_DESC."
    7.35  WEB_SITE="$WEB_SITE"
    7.36 +DEPENDS="linux-wireless wireless_tools"
    7.37  EOT
    7.38  
    7.39  # Pack
    7.40  tazpkg pack $PKG-$VERSION
    7.41  
    7.42  # Install pseudo package
    7.43 -tazpkg install $PKG-$VERSION.tazpkg
    7.44 +tazpkg install $PKG-$VERSION.tazpkg --root=$ROOT
    7.45  
    7.46  # Clean
    7.47  cd $TOP
    7.48  rm -rf $TMP
    7.49  
    7.50  # Load module
    7.51 -echo "Loading module: $MODULE..."
    7.52 -modprobe $MODULE
    7.53 -sleep 1
    7.54 +if [ -z "$ROOT" ]; then
    7.55 +	echo "Loading module: $MODULE..."
    7.56 +	modprobe $MODULE
    7.57 +	sleep 1
    7.58 +fi
    7.59  
    7.60  # Configure /etc/network.conf and start connexion
    7.61 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    7.62 -/etc/init.d/network.sh restart
    7.63 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
    7.64 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
    7.65  
     8.1 --- a/get-ipw2200-firmware/stuff/get-ipw2200-firmware	Sun Nov 16 17:23:17 2008 +0000
     8.2 +++ b/get-ipw2200-firmware/stuff/get-ipw2200-firmware	Mon Nov 17 08:50:02 2008 +0000
     8.3 @@ -7,6 +7,7 @@
     8.4  WEB_SITE="http://$MODULE.sourceforge.net/"
     8.5  RPM=$PKG-$VERSION.noarch.rpm
     8.6  WGET_URL="http://dl.atrpms.net/all/$RPM"
     8.7 +ROOT="$1"
     8.8  
     8.9  # Check if user is root to install.
    8.10  if test $(id -u) != 0 ; then
    8.11 @@ -16,19 +17,11 @@
    8.12  fi
    8.13  
    8.14  # Avoid reinstall
    8.15 -if [ -d /var/lib/tazpkg/installed/$PKG ]; then
    8.16 +if [ -d $ROOT/var/lib/tazpkg/installed/$PKG ]; then
    8.17  	echo -e "\n$PKG package is already installed.\n"
    8.18  	exit 0
    8.19  fi
    8.20  
    8.21 -# We need drivers and tools.
    8.22 -for pkg in linux-wireless wireless_tools
    8.23 -do
    8.24 -        if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
    8.25 -		tazpkg get-install $pkg
    8.26 -	fi
    8.27 -done
    8.28 -
    8.29  # Get files
    8.30  TMP=/tmp/$(basename $0)$$
    8.31  mkdir $TMP
    8.32 @@ -49,24 +42,27 @@
    8.33  CATEGORY="non-free"
    8.34  SHORT_DESC="$SHORT_DESC."
    8.35  WEB_SITE="$WEB_SITE"
    8.36 +DEPENDS="linux-wireless wireless_tools"
    8.37  EOT
    8.38  
    8.39  # Pack
    8.40  tazpkg pack $PKG-$VERSION
    8.41  
    8.42  # Install pseudo package
    8.43 -tazpkg install $PKG-$VERSION.tazpkg
    8.44 +tazpkg install $PKG-$VERSION.tazpkg --root=$ROOT
    8.45  
    8.46  # Clean
    8.47  cd $TOP
    8.48  rm -rf $TMP
    8.49  
    8.50  # Load module
    8.51 -echo "Loading module: $MODULE..."
    8.52 -modprobe $MODULE
    8.53 -sleep 1
    8.54 +if [ -z "$ROOT" ]; then
    8.55 +	echo "Loading module: $MODULE..."
    8.56 +	modprobe $MODULE
    8.57 +	sleep 1
    8.58 +fi
    8.59  
    8.60  # Configure /etc/network.conf and start connexion
    8.61 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    8.62 -/etc/init.d/network.sh restart
    8.63 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
    8.64 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
    8.65  
     9.1 --- a/get-java6-jre/stuff/get-java6-jre	Sun Nov 16 17:23:17 2008 +0000
     9.2 +++ b/get-java6-jre/stuff/get-java6-jre	Mon Nov 17 08:50:02 2008 +0000
     9.3 @@ -10,6 +10,7 @@
     9.4  URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=25051"
     9.5  TARBALL="jre-6u10-linux-i586.bin"
     9.6  TEMP_DIR="/tmp/$PACKAGE.$$"
     9.7 +ROOT="$1"
     9.8  
     9.9  # Check if we are root starting anything
    9.10  if test $(id -u) != 0 ; then
    9.11 @@ -19,7 +20,7 @@
    9.12  fi
    9.13  
    9.14  # Avoid reinstall
    9.15 -if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
    9.16 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
    9.17  	echo -e "\n$PACKAGE package is already installed.\n"
    9.18  	exit 1
    9.19  fi
    9.20 @@ -83,7 +84,7 @@
    9.21  tazpkg pack $PACKAGE-$VERSION
    9.22  
    9.23  # Install pseudo package
    9.24 -tazpkg install $PACKAGE-$VERSION.tazpkg
    9.25 +tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    9.26  
    9.27  # Clean
    9.28  cd /tmp
    10.1 --- a/get-opera/stuff/get-opera	Sun Nov 16 17:23:17 2008 +0000
    10.2 +++ b/get-opera/stuff/get-opera	Mon Nov 17 08:50:02 2008 +0000
    10.3 @@ -1,6 +1,7 @@
    10.4  #!/bin/sh -e
    10.5  
    10.6  URL=http://mirrors.dedipower.com/opera/linux/
    10.7 +ROOT="$1"
    10.8  
    10.9  if test $(id -u) != 0 ; then
   10.10          echo -e "\nYou must be root to run `basename $0`."
   10.11 @@ -8,7 +9,8 @@
   10.12          exit 0
   10.13  fi
   10.14  
   10.15 -if [ -d /var/lib/tazpkg/installed/opera ]; then
   10.16 +if [ -d $ROOT/var/lib/tazpkg/installed/opera ]; then
   10.17 +  [ -n "$ROOT" ] && exit 1
   10.18    tazpkg remove opera
   10.19    [ -d /var/lib/tazpkg/installed/opera ] && exit 1
   10.20  fi
   10.21 @@ -85,7 +87,7 @@
   10.22  tazpkg pack opera-$VERSION
   10.23  
   10.24  # Install pseudo package
   10.25 -tazpkg install opera-$VERSION.tazpkg
   10.26 +tazpkg install opera-$VERSION.tazpkg --root=$ROOT
   10.27  
   10.28  # Clean
   10.29  cd $CUR_DIR
    11.1 --- a/get-realplayer/stuff/get-realplayer	Sun Nov 16 17:23:17 2008 +0000
    11.2 +++ b/get-realplayer/stuff/get-realplayer	Mon Nov 17 08:50:02 2008 +0000
    11.3 @@ -8,6 +8,7 @@
    11.4  URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL"
    11.5  CUR_DIR=$(pwd)
    11.6  TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
    11.7 +ROOT="$1"
    11.8  
    11.9  # Check if we are root
   11.10  if test $(id -u) != 0 ; then
   11.11 @@ -17,7 +18,7 @@
   11.12  fi
   11.13  
   11.14  # Avoid reinstall
   11.15 -if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
   11.16 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
   11.17  	echo -e "\n$PACKAGE package is already installed.\n"
   11.18  	exit 1
   11.19  fi
   11.20 @@ -72,7 +73,7 @@
   11.21  tazpkg pack $PACKAGE-$VERSION
   11.22  
   11.23  # Install pseudo package
   11.24 -yes y | tazpkg install $PACKAGE-$VERSION.tazpkg
   11.25 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
   11.26  
   11.27  # Clean
   11.28  cd $CUR_DIR
    12.1 --- a/get-skype/stuff/get-skype	Sun Nov 16 17:23:17 2008 +0000
    12.2 +++ b/get-skype/stuff/get-skype	Mon Nov 17 08:50:02 2008 +0000
    12.3 @@ -1,16 +1,19 @@
    12.4  #!/bin/sh -e
    12.5  
    12.6 +ROOT="$1"
    12.7 +
    12.8  if test $(id -u) != 0 ; then
    12.9  	echo -e "\nYou must be root to run `basename $0`."
   12.10  	echo -e "Please type 'su' and root password to become super-user.\n"
   12.11  	exit 0
   12.12  fi
   12.13  
   12.14 -if [ -d /var/lib/tazpkg/installed/skype ]; then
   12.15 +if [ -d $ROOT/var/lib/tazpkg/installed/skype ]; then
   12.16 +  [ -n "$ROOT" ] && exit 1
   12.17    tazpkg remove skype
   12.18    [ -d /var/lib/tazpkg/installed/skype ] && exit 1
   12.19  fi
   12.20 -[ -d /usr/share/skype ] && rm -rf /usr/share/skype
   12.21 +[ -d $ROOT/usr/share/skype ] && rm -rf $ROOT/usr/share/skype
   12.22  
   12.23  # Download tarball
   12.24  WEB_SITE="http://www.skype.com/"
   12.25 @@ -25,25 +28,16 @@
   12.26  cd skype_static-$VERSION
   12.27  
   12.28  # Install files
   12.29 -mkdir -p /usr/share/skype
   12.30 -mv */ LICENSE README /usr/share/skype
   12.31 -mv skype /usr/bin
   12.32 -mv skype.conf /etc
   12.33 -mv skype.desktop /usr/share/applications
   12.34 -ln /usr/share/skype/icons/*16.png /usr/share/pixmaps/skype.png
   12.35 +mkdir -p skype-$VERSION/fs/usr/share/skype skype-$VERSION/fs/usr/bin
   12.36 +mkdir -p skype-$VERSION/fs/etc skype-$VERSION/fs/usr/share/applications
   12.37 +mkdir -p skype-$VERSION/fs/usr/share/pixmaps
   12.38 +mv */ LICENSE README skype-$VERSION/fs/usr/share/skype
   12.39 +mv skype skype-$VERSION/fs/usr/bin
   12.40 +mv skype.conf skype-$VERSION/fs/etc
   12.41 +mv skype.desktop skype-$VERSION/fs/usr/share/applications
   12.42 +ln skype-$VERSION/fs/usr/share/skype/icons/*16.png skype-$VERSION/fs/usr/share/pixmaps/skype.png
   12.43  
   12.44  # Create pseudo package
   12.45 -while read file; do
   12.46 -	dest=skype-$VERSION/fs$(dirname $file)
   12.47 -	[ -d $dest ] || mkdir -p $dest
   12.48 -	cp -a $file $dest
   12.49 -done <<EOT
   12.50 -/usr/bin/skype
   12.51 -/etc/skype.conf
   12.52 -/usr/share/applications/skype.desktop
   12.53 -/usr/share/pixmaps/skype.png
   12.54 -/usr/share/skype
   12.55 -EOT
   12.56  cat > skype-$VERSION/receipt <<EOT
   12.57  PACKAGE="skype"
   12.58  VERSION="$VERSION"
   12.59 @@ -58,7 +52,7 @@
   12.60  tazpkg pack skype-$VERSION
   12.61  
   12.62  # Install pseudo package
   12.63 -tazpkg install skype-$VERSION.tazpkg
   12.64 +tazpkg install skype-$VERSION.tazpkg --root=$ROOT
   12.65  cd ..
   12.66  
   12.67  # Clean
    13.1 --- a/get-texlive/stuff/get-texlive	Sun Nov 16 17:23:17 2008 +0000
    13.2 +++ b/get-texlive/stuff/get-texlive	Mon Nov 17 08:50:02 2008 +0000
    13.3 @@ -11,11 +11,7 @@
    13.4  TARBALL="$SOURCE-unx.tar.gz"
    13.5  WEB_SITE="http://www.tug.org/$PACKAGE/"
    13.6  WGET_URL="http://mirror.ctan.org/systems/$PACKAGE/tlnet/$VERSION/$TARBALL"
    13.7 -
    13.8 -# TexLive is a big package. We must inform user.
    13.9 -PACKED_SIZE="10.7Mo"
   13.10 -UNPACKED_SIZE="31.0Mo"
   13.11 -
   13.12 +ROOT="$1"
   13.13  
   13.14  # Check if we are root
   13.15  if test $(id -u) != 0 ; then
   13.16 @@ -25,7 +21,7 @@
   13.17  fi
   13.18  
   13.19  # Avoid reinstall
   13.20 -if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
   13.21 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
   13.22  	echo -e "\n$PKG package is already installed.\n"
   13.23  	exit 0
   13.24  fi
   13.25 @@ -85,9 +81,6 @@
   13.26  cat > $PACKAGE-$VERSION/receipt <<EOT
   13.27  # SliTaz package receipt.
   13.28  
   13.29 -PACKED_SIZE="$PACKED_SIZE"
   13.30 -UNPACKED_SIZE="$UNPACKED_SIZE"
   13.31 -
   13.32  PACKAGE="$PACKAGE"
   13.33  VERSION="$VERSION"
   13.34  CATEGORY="$CATEGORY"
   13.35 @@ -129,12 +122,15 @@
   13.36  tazpkg pack $PACKAGE-$VERSION
   13.37  
   13.38  
   13.39 -echo -n "\nPlease confirm installation of $PACKAGE-$VERSION (y/N): "
   13.40 -read CONFIRM
   13.41 +CONFIRM="y"
   13.42 +if [ -z "$ROOT" ]; then
   13.43 +	echo -n "\nPlease confirm installation of $PACKAGE-$VERSION (y/N): "
   13.44 +	read CONFIRM
   13.45 +fi
   13.46  if [ $CONFIRM = "y" ]
   13.47  	then
   13.48  	# Install pseudo package
   13.49 -	tazpkg install $PACKAGE-$VERSION.tazpkg
   13.50 +	tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
   13.51  fi
   13.52  
   13.53  # Clean
    14.1 --- a/get-wifi-firmware/stuff/get-wifi-firmware	Sun Nov 16 17:23:17 2008 +0000
    14.2 +++ b/get-wifi-firmware/stuff/get-wifi-firmware	Mon Nov 17 08:50:02 2008 +0000
    14.3 @@ -2,6 +2,7 @@
    14.4  # install linux-wireless, wireless_tools and b43-fwcutter if needed.
    14.5  
    14.6  MODULE=$(echo $0 | sed 's/.*get-\(.*\)-firmware/\1/')
    14.7 +ROOT="$1"
    14.8  PKG=$MODULE-firmware
    14.9  DEPENDS=""
   14.10  case "$MODULE" in
   14.11 @@ -50,15 +51,15 @@
   14.12  fi
   14.13  
   14.14  # Avoid reinstall
   14.15 -if [ -d /var/lib/tazpkg/installed/$PKG ]; then
   14.16 +if [ -d $ROOT/var/lib/tazpkg/installed/$PKG ]; then
   14.17  	echo -e "\n$PKG package is already installed.\n"
   14.18  	exit 0
   14.19  fi
   14.20  
   14.21 -# We need drivers and tools.
   14.22 -for pkg in linux-wireless wireless_tools $DEPENDS
   14.23 +# We need drivers, the extractor and tools.
   14.24 +for pkg in linux-wireless b43-fwcutter wireless_tools
   14.25  do
   14.26 -        if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
   14.27 +	if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
   14.28  		tazpkg get-install $pkg
   14.29  	fi
   14.30  done
   14.31 @@ -91,33 +92,35 @@
   14.32  CATEGORY="non-free"
   14.33  SHORT_DESC="$SHORT_DESC."
   14.34  WEB_SITE="$WEB_SITE"
   14.35 +DEPENDS="linux-wireless wireless_tools $DEPENDS"
   14.36  EOT
   14.37 -[ -n "$DEPENDS" ] echo "DEPENDS=$DEPENDS" >> $PKG-$VERSION/receipt
   14.38  
   14.39  # Pack
   14.40  tazpkg pack $PKG-$VERSION
   14.41  
   14.42  # Install pseudo package
   14.43 -tazpkg install $PKG-$VERSION.tazpkg
   14.44 +tazpkg install $PKG-$VERSION.tazpkg --root=$ROOT
   14.45  
   14.46  # Clean
   14.47  cd $TOP
   14.48  rm -rf $TMP
   14.49  
   14.50  # Check if we need wpa_supplicant
   14.51 -. /etc/network.conf
   14.52 +. $ROOT/etc/network.conf
   14.53  if [ $WIFI_KEY_TYPE = "wpa" ] || [ $WIFI_KEY_TYPE = "WPA" ]; then
   14.54 -	if [ ! -d /var/lib/tazpkg/installed/wpa_supplicant ]; then
   14.55 -		tazpkg get-install wpa_supplicant
   14.56 +	if [ ! -d $ROOT/var/lib/tazpkg/installed/wpa_supplicant ]; then
   14.57 +		tazpkg get-install wpa_supplicant --root=$ROOT
   14.58  	fi
   14.59  fi
   14.60  
   14.61  # Load module
   14.62 -echo "Loading module: $MODULE..."
   14.63 -modprobe $MODULE
   14.64 -sleep 1
   14.65 +if [ -z "$ROOT" ]; then
   14.66 +	echo "Loading module: $MODULE..."
   14.67 +	modprobe $MODULE
   14.68 +	sleep 1
   14.69 +fi
   14.70  
   14.71  # Configure /etc/network.conf and start connexion
   14.72 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
   14.73 -/etc/init.d/network.sh restart
   14.74 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf
   14.75 +[ -z "$ROOT" ] && /etc/init.d/network.sh restart
   14.76