wok view slitaz-loram/receipt @ rev 240
Shfs & squashfs : no WANTED with WGET_URL
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 18 00:24:44 2008 +0100 (2008-02-18) |
parents | 0257ebeb385f |
children | 1ca9367ddcd4 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-loram"
4 VERSION="1.1"
5 CATEGORY="misc"
6 SHORT_DESC="Rules to build low ram rootfs.gz."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="squashfs"
10 # Rules to gen a SliTaz package suitable for Tazpkg.
11 genpkg_rules()
12 {
13 mkdir -p $fs/etc/tazlito
14 cat > $fs/etc/tazlito/loram.rootfs << EOF
15 echo "\$(du -hs ./usr | cut -f1) were used by /usr"
16 for ii in /sbin /lib /bin; do
17 mkdir -p ./usr/.moved\$ii
18 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ; do
19 for k in \$(grep ^\$ii ./var/lib/tazpkg/installed/\$j/files.list) ; do
20 [ -f .\$k ] || continue
21 mv .\$k ./usr/.moved\$k
22 ln -s /usr/.moved$k .\$k
23 done
24 done
25 done
26 for ii in /var/lib/tazpkg/installed ; do
27 j=\$(dirname /usr/.moved\$ii)
28 mkdir -p .\$j
29 mv .\$ii .\$j
30 ln -s /usr/.moved\$ii .\$ii
31 done
32 echo "\$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
33 echo "\$(du -hs ./usr | cut -f1) were used by /usr before compression"
34 mksquashfs usr .usr.sqfs
35 rm -rf usr
36 mkdir usr
37 COMPRESSION="none"
38 echo "\$(du -hs ./.usr.sqfs | cut -f1) are used by /usr after compression"
39 EOF
40 }
42 get_patch()
43 {
44 cat <<EOF
45 --- /etc/init.d/rcS
46 +++ /etc/init.d/rcS
47 @@ -79,2 +79,9 @@
49 +# Mount compressed /usr
50 +if [ -f /.usr.sqfs ]; then
51 + echo -n "Mounting compressed /usr read-only... "
52 + /bin/mount -o loop,ro -t squashfs /.usr.sqfs /usr
53 + status
54 +fi
55 +
56 # Handle kernel cmdline parameter config=<device>,<path> to source a
57 EOF
58 }
60 # Pre and post install commands for Tazpkg.
61 post_install()
62 {
63 get_patch | patch -p0
64 }
66 # Pre remove commands for Tazpkg.
67 pre_remove()
68 {
69 get_patch | patch -R -p0
70 }