wok-current rev 4775
get-virtualbox: add missing file.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Jan 13 13:44:59 2010 +0100 (2010-01-13) |
parents | 92043c812b45 |
children | 7c843086474b |
files | get-virtualbox/stuff/installer.u |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-virtualbox/stuff/installer.u Wed Jan 13 13:44:59 2010 +0100 1.3 @@ -0,0 +1,192 @@ 1.4 +--- stuff/get-virtualbox Fri Jan 8 00:18:30 2010 1.5 ++++ get-virtualbox Tue Jan 12 23:08:29 2010 1.6 +@@ -24,13 +24,14 @@ 1.7 + grep Linux_x86.run | sed 's|.*href="\(.*Linux_x86.run\).*|\1|' 1.8 + } 1.9 + 1.10 +-TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM 1.11 ++#TMP_DIR=/home/slitaz/src/get-$PACKAGE-$$-$RANDOM 1.12 ++TMP_DIR=/home/slitaz/src/get-$PACKAGE.tmp 1.13 + CUR_DIR=$(pwd) 1.14 + mkdir -p $TMP_DIR && cd $TMP_DIR 1.15 + 1.16 + url=$(dl_url) 1.17 + TARBALL=$(basename $url) 1.18 +-wget $url 1.19 ++#wget $url 1.20 + 1.21 + if [ ! -f "$TARBALL" ]; then 1.22 + cd $CUR_DIR 1.23 +@@ -55,6 +56,145 @@ 1.24 + 1.25 + # Install files 1.26 + cd install 1.27 ++ 1.28 ++# Add Slitaz support to VirtualBox installer. 1.29 ++patch -p1 <<'EOT' 1.30 ++--- install-ori/routines.sh Thu Dec 17 14:37:35 2009 1.31 +++++ install/routines.sh Thu Dec 24 00:17:33 2009 1.32 ++@@ -207,6 +207,10 @@ 1.33 ++ ro_SYS_TYPE=unknown 1.34 ++ ro_INIT_TYPE=bsd 1.35 ++ ro_RC_LOCAL=/etc/rc.local 1.36 +++ elif [ -f /etc/slitaz-release ]; then 1.37 +++ ro_SYS_TYPE=slitaz 1.38 +++ ro_INIT_TYPE=slitaz 1.39 +++ ro_RC_LOCAL=/etc/rcS.conf 1.40 ++ elif [ -d /etc/init.d ]; then 1.41 ++ ro_SYS_TYPE=unknown 1.42 ++ ro_INIT_TYPE=sysv 1.43 ++@@ -252,6 +256,9 @@ 1.44 ++ cp "$script" "/usr/sbin/$name" 2> /dev/null 1.45 ++ chmod 755 "/usr/sbin/$name" 2> /dev/null 1.46 ++ hav register $name System.Service $pardus_script 1.47 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.48 +++ cp "$script" "/etc/rc.d/init.d/$name" 2> /dev/null 1.49 +++ chmod 755 "/etc/rc.d/init.d/$name" 2> /dev/null 1.50 ++ else 1.51 ++ log "install_init_script: error: unknown init type" 1.52 ++ return 1 1.53 ++@@ -279,6 +286,8 @@ 1.54 ++ elif [ "$ro_INIT_TYPE" = "pardus" ]; then 1.55 ++ hav remove $name 1.56 ++ rm -f "/usr/sbin/$name" > /dev/null 2>&1 1.57 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.58 +++ rm -f "/etc/rc.d/init.d/$name" > /dev/null 2>&1 1.59 ++ else 1.60 ++ log "remove_init_script: error: unknown init type" 1.61 ++ return 1 1.62 ++@@ -303,6 +312,8 @@ 1.63 ++ "/etc/rc.d/rc.$name" start >> $ro_LOG_FILE 2>&1 1.64 ++ elif [ "$ro_INIT_TYPE" = "lfs" ]; then 1.65 ++ "/etc/rc.d/init.d/$name" start >> $ro_LOG_FILE 2>&1 1.66 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.67 +++ "/etc/rc.d/init.d/$name" start >> $ro_LOG_FILE 2>&1 1.68 ++ elif [ "$ro_INIT_TYPE" = "pardus" ]; then 1.69 ++ service $name on 1.70 ++ else 1.71 ++@@ -328,6 +339,8 @@ 1.72 ++ "/etc/rc.d/rc.$name" stop >> $ro_LOG_FILE 2>&1 1.73 ++ elif [ "$ro_INIT_TYPE" = "lfs" ]; then 1.74 ++ "/etc/rc.d/init.d/$name" stop >> $ro_LOG_FILE 2>&1 1.75 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.76 +++ "/etc/rc.d/init.d/$name" stop >> $ro_LOG_FILE 2>&1 1.77 ++ elif [ "$ro_INIT_TYPE" = "pardus" ]; then 1.78 ++ service $name off 1.79 ++ else 1.80 ++@@ -425,6 +438,12 @@ 1.81 ++ echo "fi" >> $ro_RC_LOCAL 1.82 ++ echo "" >> $ro_RC_LOCAL 1.83 ++ fi 1.84 +++ # Slitaz GNU/Linux use /etc/rcS.conf to start services. 1.85 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.86 +++ if ! grep $1 $ro_RC_LOCAL 1.87 +++ then 1.88 +++ sed -i -e "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"\1 $1\"/" $ro_RC_LOCAL 1.89 +++ fi 1.90 ++ # Probably most unknown Linux systems will be sysv type ones. These can theoretically 1.91 ++ # be handled automatically if people give us information about them. 1.92 ++ elif [ "$ro_INIT_TYPE" = "sysv" ]; then 1.93 ++@@ -484,6 +503,12 @@ 1.94 ++ rm "/etc/rc4.d/S??$1" > /dev/null 2>&1 1.95 ++ rm "/etc/rc5.d/S??$1" > /dev/null 2>&1 1.96 ++ rm "/etc/rc6.d/K??$1" > /dev/null 2>&1 1.97 +++ # Slitaz GNU/Linux 1.98 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.99 +++ if grep $1 $ro_RC_LOCAL 1.100 +++ then 1.101 +++ sed -i -e "s/$1//" $ro_RC_LOCAL 1.102 +++ fi 1.103 ++ # Unknown sysv-type system 1.104 ++ elif [ "$ro_INIT_TYPE" = "sysv" ]; then 1.105 ++ echo 1>&2 "Please remove remove references to the initialization script" 1.106 ++@@ -515,6 +540,8 @@ 1.107 ++ scriptname="/etc/rc.d/init.d/$name" 1.108 ++ elif [ "$ro_INIT_TYPE" = "pardus" ]; then 1.109 ++ scriptname="/usr/sbin/$name" 1.110 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.111 +++ scriptname="/etc/init.d/$name" 1.112 ++ else 1.113 ++ log "$self: error: unknown init type" 1.114 ++ return 1 1.115 ++@@ -563,6 +590,8 @@ 1.116 ++ scriptname="/etc/rc.d/init.d/$name" 1.117 ++ elif [ "$ro_INIT_TYPE" = "pardus" ]; then 1.118 ++ scriptname="/usr/sbin/$name" 1.119 +++ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then 1.120 +++ scriptname="/etc/rc.d/init.d/$name" 1.121 ++ else 1.122 ++ log "$self: error: unknown init type" 1.123 ++ return 1 1.124 ++--- install-ori/vboxdrv.sh Thu Dec 17 14:37:35 2009 1.125 +++++ install/vboxdrv.sh Wed Dec 23 23:01:14 2009 1.126 ++@@ -63,6 +63,8 @@ 1.127 ++ system=suse 1.128 ++ elif [ -f /etc/gentoo-release ]; then 1.129 ++ system=gentoo 1.130 +++ elif [ -f /etc/slitaz-release ]; then 1.131 +++ system=slitaz 1.132 ++ fi 1.133 ++ fi 1.134 ++ 1.135 ++@@ -123,6 +125,19 @@ 1.136 ++ if [ "`which $0`" = "/sbin/rc" ]; then 1.137 ++ shift 1.138 ++ fi 1.139 +++ elif [ "$system" = "slitaz" ]; then 1.140 +++ if [ -f /etc/init.d/rc.functions ]; then 1.141 +++ . /etc/init.d/rc.functions 1.142 +++ fi 1.143 +++ fail_msg() { 1.144 +++ status 1.145 +++ } 1.146 +++ succ_msg() { 1.147 +++ status "$?" 1.148 +++ } 1.149 +++ begin_msg() { 1.150 +++ echo "$1" 1.151 +++ } 1.152 ++ else 1.153 ++ fail_msg() { 1.154 ++ echo " ...failed!" 1.155 ++@@ -132,6 +147,7 @@ 1.156 ++ echo " ...done." 1.157 ++ } 1.158 ++ fi 1.159 +++ 1.160 ++ if [ "$system" != "gentoo" ]; then 1.161 ++ begin_msg() { 1.162 ++ [ -z "${1:-}" ] && return 1 1.163 ++EOT 1.164 ++ 1.165 ++ 1.166 + [ -d /usr/share/VirtualBox ] && ./uninstall.sh 1.167 + find /usr /etc /lib > ../before 1.168 + ./install.sh install /usr/share/VirtualBox 1.169 +@@ -76,13 +216,19 @@ 1.170 + CATEGORY="non-free" 1.171 + SHORT_DESC="$SHORT_DESC" 1.172 + WEB_SITE="$WEB_SITE" 1.173 +-DEPENDS="libsdl fontconfig gcc-lib-base glib libpng python udev" 1.174 ++DEPENDS="libsdl fontconfig gcc-lib-base glib libpng python udev libglu-mesa" 1.175 + 1.176 + post_install() 1.177 + { 1.178 + $(grep ' udev[atp]' install/install.sh) 1.179 + chroot "\$1/" depmod -a $(uname -r) 1.180 + } 1.181 ++ 1.182 ++post_remove() 1.183 ++{ 1.184 ++ /etc/init.d/vboxdrv stop 1.185 ++ sed -i 's/vboxdrv//' /etc/rcS.conf 1.186 ++} 1.187 + EOT 1.188 + 1.189 + # Pack 1.190 +@@ -93,4 +239,4 @@ 1.191 + 1.192 + # Clean 1.193 + cd $CUR_DIR 1.194 +-rm -rf $TMP_DIR 1.195 ++#rm -rf $TMP_DIR