wok-next diff slitaz-loram-http/receipt @ rev 4142

Add: xfconf,xfconf-dev
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Sep 20 13:38:33 2009 +0000 (2009-09-20)
parents bf6b4e59baf3
children 179928518182
line diff
     1.1 --- a/slitaz-loram-http/receipt	Wed Sep 09 12:11:22 2009 +0200
     1.2 +++ b/slitaz-loram-http/receipt	Sun Sep 20 13:38:33 2009 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="slitaz-loram-http"
     1.7 -VERSION="1.1"
     1.8 +VERSION="1.5"
     1.9  CATEGORY="misc"
    1.10  SHORT_DESC="Rules to build low ram system using http."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -19,17 +19,19 @@
    1.13  {
    1.14      local tag
    1.15      local line
    1.16 +    local len
    1.17      local i
    1.18      tag="Handle kernel cmdline parameter config"
    1.19      i=$(grep -n "$tag" $1/etc/init.d/rcS | cut -d: -f1)
    1.20      i=$(($i-1))
    1.21 +    len=71
    1.22      tag=$(grep "$tag" $1/etc/init.d/rcS)
    1.23      if [ "$2" = "-R" ]; then
    1.24 -    	line="-$(($i-52)),54 +$(($i-52)),2"
    1.25 +    	line="-$(($i-$len+2)),$len +$(($i-$len+2)),2"
    1.26  	i="-"
    1.27      else
    1.28          grep -q 'from slitaz-loram-http package' $1/etc/init.d/rcS && return
    1.29 -    	line="-$i,2 +$i,54"
    1.30 +    	line="-$i,2 +$i,$len"
    1.31  	i="+"
    1.32      fi
    1.33      patch -p0 <<EOF
    1.34 @@ -43,19 +45,34 @@
    1.35  $i	FREEMEM=\$(busybox free | busybox awk '{ n = \$NF } END { print n }')	
    1.36  $i	if [ \$FREEMEM -gt \$(busybox du -s \$FS | busybox awk '{ print \$1+40000 }') ]; then
    1.37  $i		status
    1.38 +$i		if grep -q " extract-loram" /proc/cmdline &&
    1.39 +$i		    [ -d \$FS -o \$FREEMEM -gt \$(busybox du -s \$FS | \\
    1.40 +$i			busybox awk '{ print (\$1*4)+40000 }') ]; then
    1.41 +$i			echo -n "Extracting loram..."
    1.42 +$i			. /etc/tazlito/loram.extract /cdrom
    1.43 +$i			if status; then
    1.44 +$i				umount /cdrom && umount /cdrom
    1.45 +$i				rmdir /cdrom
    1.46 +$i				yes y | tazpkg remove slitaz-loram-http > /dev/null
    1.47 +$i				return 0
    1.48 +$i			fi
    1.49 +$i		fi
    1.50  $i		echo -n "Loading /usr in memory..."
    1.51  $i		cp -a \$FS /.usr.fs
    1.52  $i		status
    1.53  $i		echo -n "Releasing HTTP link..."
    1.54  $i		umount /cdrom && umount /cdrom
    1.55  $i		FS=/.usr.fs
    1.56 -$i		return 0
    1.57 +$i		if [ -d \$FS ]; then
    1.58 +$i			rm -f /\$usr
    1.59 +$i			mv \$FS /usr
    1.60 +$i		fi
    1.61  $i	fi
    1.62  $i	return 1
    1.63  $i }
    1.64  $i
    1.65  $i# Mount /usr (from slitaz-loram-http package)
    1.66 -$i if [ -d /cdrom ]; then
    1.67 +$i while [ -d /cdrom ]; do
    1.68  $i	/etc/init.d/network.sh
    1.69  $i	RUN_SCRIPTS="\$(echo \$RUN_SCRIPTS | sed 's/network.sh//')"
    1.70  $i	URLISO=http://mirror.slitaz.org/iso/\$(cat /etc/slitaz-release)/flavors/slitaz-loram-cdrom.iso
    1.71 @@ -71,15 +88,16 @@
    1.72  $i	fi
    1.73  $i	FS=/cdrom/usr.cromfs
    1.74  $i	if [ -f \$FS ]; then
    1.75 -$i		release_http
    1.76  $i		mkdir /\$usr
    1.77 +$i		release_http && break
    1.78  $i		/bin/cromfs-driver \$FS /\$usr -o ro,dev,suid,allow_other
    1.79  $i	elif [ -f /cdrom/usr.sqfs ]; then
    1.80  $i		FS=/cdrom/usr.sqfs
    1.81 -$i		release_http
    1.82  $i		mkdir /\$usr
    1.83 +$i		release_http && break
    1.84  $i		mount -o loop,ro -t squashfs \$FS /\$usr
    1.85  $i	else
    1.86 +$i		release_http && break
    1.87  $i		FS=/cdrom/usr
    1.88  $i		ln -s \$FS /\$usr
    1.89  $i	fi
    1.90 @@ -87,7 +105,8 @@
    1.91  $i	if [ -d /.usr.rw -a -x /bin/funionfs ]; then
    1.92  $i		/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other,nonempty -o suid,dev NONE /usr
    1.93  $i	fi
    1.94 -$i fi
    1.95 +$i	break
    1.96 +$i done
    1.97  $i
    1.98   $tag
    1.99  EOF