wok-next diff slitaz-loram/receipt @ rev 13915
Add xpaint (thanks mojo)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 25 10:03:15 2013 +0100 (2013-01-25) |
parents | fa0257184d3c |
children | f4c22f009037 |
line diff
1.1 --- a/slitaz-loram/receipt Fri Mar 05 17:52:43 2010 +0100 1.2 +++ b/slitaz-loram/receipt Fri Jan 25 10:03:15 2013 +0100 1.3 @@ -1,11 +1,11 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="slitaz-loram" 1.7 -VERSION="1.6" 1.8 +VERSION="2.0" 1.9 CATEGORY="misc" 1.10 SHORT_DESC="Rules to build low ram rootfs.gz." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 -DEPENDS="slitaz-boot-scripts tazlito cromfs-or-squashfs" 1.13 +DEPENDS="" 1.14 WEB_SITE="http://www.slitaz.org/" 1.15 1.16 # Rules to gen a SliTaz package suitable for Tazpkg. 1.17 @@ -14,111 +14,3 @@ 1.18 mkdir -p $fs/etc/tazlito 1.19 cp stuff/loram.* $fs/etc/tazlito 1.20 } 1.21 - 1.22 -set_patch() 1.23 -{ 1.24 - local tag 1.25 - local line 1.26 - local len 1.27 - local i 1.28 - tag="Fast boot into X" 1.29 - i=$(grep -n "$tag" $1/etc/init.d/rcS | cut -d: -f1) 1.30 - i=$(($i-1)) 1.31 - len=38 1.32 - tag=$(grep "$tag" $1/etc/init.d/rcS) 1.33 - if [ "$2" = "-R" ]; then 1.34 - line="-$(($i-$len+2)),$len +$(($i-$len+2)),2" 1.35 - i="-" 1.36 - else 1.37 - grep -q 'from slitaz-loram package' $1/etc/init.d/rcS && return 1.38 - line="-$i,2 +$i,$len" 1.39 - i="+" 1.40 - fi 1.41 - busybox patch -p0 <<EOF 1.42 ---- $1/etc/init.d/rcS 1.43 -+++ $1/etc/init.d/rcS 1.44 -@@ $line @@ 1.45 - 1.46 -$i# Mount compressed /usr (from slitaz-loram package) 1.47 -$i while [ -f /.usr.cromfs -o -f /.usr.sqfs ]; do 1.48 -$i usr=usr 1.49 -$i echo -n "Mounting /usr read-" 1.50 -$i if [ -d /.usr.rw ]; then 1.51 -$i usr=.usr.ro 1.52 -$i echo -n "write... " 1.53 -$i else 1.54 -$i echo -n "only... " 1.55 -$i fi 1.56 -$i FREEMEM=\$(free | awk '{ n = \$NF } END { print n }') 1.57 -$i if ! grep -q " keep-loram" /proc/cmdline && [ \$FREEMEM -gt \\ 1.58 -$i \$(du -s \$FS | awk '{ print (\$1*4)+40000 }') ]; then 1.59 -$i echo -n "Extracting loram..." 1.60 -$i . /etc/tazlito/loram.extract 1.61 -$i if status; then 1.62 -$i yes y | tazpkg remove slitaz-loram > /dev/null 1.63 -$i break 1.64 -$i fi 1.65 -$i fi 1.66 -$i if [ -f /.usr.cromfs ]; then 1.67 -$i /bin/cromfs-driver /.usr.cromfs /\$usr -o ro,dev,suid,allow_other 1.68 -$i else 1.69 -$i /bin/mount -o loop,ro -t squashfs /.usr.sqfs /\$usr 1.70 -$i fi 1.71 -$i if [ -d /.usr.rw ]; then 1.72 -$i if [ -x bin/funionfs ]; then 1.73 -$i /bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other -o suid,dev NONE /usr 1.74 -$i else 1.75 -$i /bin/mount -t aufs -o br:/.usr.rw:/.usr.ro none /usr 1.76 -$i fi 1.77 -$i fi 1.78 -$i status 1.79 -$i break 1.80 -$i done 1.81 -$i 1.82 - $tag 1.83 -EOF 1.84 - chmod 0755 $1/etc/init.d/rcS 1.85 -} 1.86 - 1.87 -# Pre and post install commands for Tazpkg. 1.88 -pre_install() 1.89 -{ 1.90 - local i 1.91 - for i in $(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null); do 1.92 - [ "$i" = "$PACKAGE" ] && continue 1.93 - yes y | tazpkg remove $i 1.94 - . /etc/tazlito/tazlito.conf 1.95 - rm -f $PACKAGES_REPOSITORY/slitaz-boot-scripts-*.tazpkg 2> /dev/null 1.96 - done 1.97 -} 1.98 - 1.99 -post_install() 1.100 -{ 1.101 - set_patch "$1" 1.102 - cat <<EOF 1.103 ----- 1.104 -'tazlito gen-distro' will create a loram flavor while this package is installed. 1.105 -EOF 1.106 - if [ ! -x $1/bin/funionfs -a ! -d $1/var/lib/tazpkg/installed/aufs-utils ]; then 1.107 - cat <<EOF 1.108 ----- 1.109 -You will build a live CD with /usr mounted read-only. 1.110 -You can install aufs or funionfs to have read-write access into /usr with: 1.111 - 1.112 -# tazpkg get-install aufs 1.113 -or 1.114 -# tazpkg get-install funionfs 1.115 - 1.116 -EOF 1.117 - fi 1.118 -} 1.119 - 1.120 -# Pre remove commands for Tazpkg. 1.121 -pre_remove() 1.122 -{ 1.123 - set_patch '' -R 1.124 - cat <<EOF 1.125 ----- 1.126 -'tazlito gen-distro' will work as expected now. 1.127 -EOF 1.128 -}