wok view 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
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-loram"
4 VERSION="1.2"
5 CATEGORY="misc"
6 SHORT_DESC="Rules to build low ram rootfs.gz."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="cromfs"
10 # Rules to gen a SliTaz package suitable for Tazpkg.
11 genpkg_rules()
12 {
13 mkdir -p $fs/etc/tazlito
14 cp stuff/loram.rootfs $fs/etc/tazlito
15 }
17 get_patch()
18 {
19 cat <<EOF
20 --- /etc/init.d/rcS
21 +++ /etc/init.d/rcS
22 @@ -58,2 +58,14 @@
24 +# Mount compressed /usr
25 +if [ -f /.usr.cromfs ]; then
26 + echo -n "Mounting compressed /usr read-only... "
27 + if [ -d /.usr.rw ]; then
28 + /bin/cromfs-driver /.usr.cromfs /.usr.ro
29 + /bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other NONE /usr
30 + else
31 + /bin/cromfs /.usr.cromfs /usr
32 + fi
33 + status
34 +fi
35 +
36 # Creat /dev/cdrom if needed (symlink does not exist on LiveCD). Chmod
37 EOF
38 }
40 # Pre and post install commands for Tazpkg.
41 pre_install()
42 {
43 local $loram
44 loram=$(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null)
45 [ -n "$loram" ] && yes y | tazpkg remove $loram
46 }
48 post_install()
49 {
50 get_patch | patch -p0
51 }
53 # Pre remove commands for Tazpkg.
54 pre_remove()
55 {
56 [ -L /usr/bin/patch ] || get_patch | patch -R -p0
57 }