wok annotate slitaz-loram/receipt @ rev 309
Slitaz-loram*: update patch according to /etc/init.d/rcS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 01 12:55:33 2008 +0000 (2008-03-01) |
parents | 39ab194bbbef |
children | c570ed86d31a |
rev | line source |
---|---|
pascal@229 | 1 # SliTaz package receipt. |
pascal@229 | 2 |
pascal@229 | 3 PACKAGE="slitaz-loram" |
pascal@233 | 4 VERSION="1.1" |
pascal@229 | 5 CATEGORY="misc" |
pascal@229 | 6 SHORT_DESC="Rules to build low ram rootfs.gz." |
pascal@229 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@229 | 8 DEPENDS="squashfs" |
pascal@229 | 9 |
pascal@229 | 10 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@229 | 11 genpkg_rules() |
pascal@229 | 12 { |
pascal@229 | 13 mkdir -p $fs/etc/tazlito |
pascal@309 | 14 cp stuff/loram.rootfs $fs/etc/tazlito |
pascal@229 | 15 } |
pascal@229 | 16 |
pascal@229 | 17 get_patch() |
pascal@229 | 18 { |
pascal@229 | 19 cat <<EOF |
pascal@229 | 20 --- /etc/init.d/rcS |
pascal@229 | 21 +++ /etc/init.d/rcS |
pascal@309 | 22 @@ -58,2 +58,9 @@ |
pascal@229 | 23 |
pascal@229 | 24 +# Mount compressed /usr |
pascal@229 | 25 +if [ -f /.usr.sqfs ]; then |
pascal@233 | 26 + echo -n "Mounting compressed /usr read-only... " |
pascal@229 | 27 + /bin/mount -o loop,ro -t squashfs /.usr.sqfs /usr |
pascal@233 | 28 + status |
pascal@229 | 29 +fi |
pascal@229 | 30 + |
pascal@249 | 31 # Creat /dev/cdrom if needed (symlink does not exist on LiveCD). Chmod |
pascal@229 | 32 EOF |
pascal@229 | 33 } |
pascal@229 | 34 |
pascal@229 | 35 # Pre and post install commands for Tazpkg. |
pascal@251 | 36 pre_install() |
pascal@251 | 37 { |
pascal@251 | 38 local $loram |
pascal@251 | 39 loram=$(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null) |
pascal@251 | 40 [ -n "$loram" ] && yes y | tazpkg remove $loram |
pascal@251 | 41 } |
pascal@251 | 42 |
pascal@229 | 43 post_install() |
pascal@229 | 44 { |
pascal@229 | 45 get_patch | patch -p0 |
pascal@229 | 46 } |
pascal@229 | 47 |
pascal@229 | 48 # Pre remove commands for Tazpkg. |
pascal@229 | 49 pre_remove() |
pascal@229 | 50 { |
pascal@309 | 51 [ -L /usr/bin/patch ] || get_patch | patch -R -p0 |
pascal@229 | 52 } |