wok-6.x annotate slitaz-loram/receipt @ rev 369
Slitaz-loram: version 1.2, access r/w to /usr
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 08 01:10:18 2008 +0000 (2008-03-08) |
parents | 3a5e92c048e0 |
children | fc9f573e8ac8 |
rev | line source |
---|---|
pascal@229 | 1 # SliTaz package receipt. |
pascal@229 | 2 |
pascal@229 | 3 PACKAGE="slitaz-loram" |
pascal@369 | 4 VERSION="1.2" |
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@369 | 8 DEPENDS="cromfs" |
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@369 | 22 @@ -58,2 +58,14 @@ |
pascal@229 | 23 |
pascal@229 | 24 +# Mount compressed /usr |
pascal@369 | 25 +if [ -f /.usr.cromfs ]; then |
pascal@233 | 26 + echo -n "Mounting compressed /usr read-only... " |
pascal@369 | 27 + if [ -d /.usr.rw ]; then |
pascal@369 | 28 + /bin/cromfs-driver /.usr.cromfs /.usr.ro |
pascal@369 | 29 + /bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other NONE /usr |
pascal@369 | 30 + else |
pascal@369 | 31 + /bin/cromfs /.usr.cromfs /usr |
pascal@369 | 32 + fi |
pascal@233 | 33 + status |
pascal@229 | 34 +fi |
pascal@229 | 35 + |
pascal@249 | 36 # Creat /dev/cdrom if needed (symlink does not exist on LiveCD). Chmod |
pascal@229 | 37 EOF |
pascal@229 | 38 } |
pascal@229 | 39 |
pascal@229 | 40 # Pre and post install commands for Tazpkg. |
pascal@251 | 41 pre_install() |
pascal@251 | 42 { |
pascal@251 | 43 local $loram |
pascal@251 | 44 loram=$(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null) |
pascal@251 | 45 [ -n "$loram" ] && yes y | tazpkg remove $loram |
pascal@251 | 46 } |
pascal@251 | 47 |
pascal@229 | 48 post_install() |
pascal@229 | 49 { |
pascal@229 | 50 get_patch | patch -p0 |
pascal@229 | 51 } |
pascal@229 | 52 |
pascal@229 | 53 # Pre remove commands for Tazpkg. |
pascal@229 | 54 pre_remove() |
pascal@229 | 55 { |
pascal@309 | 56 [ -L /usr/bin/patch ] || get_patch | patch -R -p0 |
pascal@229 | 57 } |