wok-4.x view slitaz-loram/receipt @ rev 250

ADD: vim
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Fri Feb 22 11:22:36 2008 +0100 (2008-02-22)
parents 1ca9367ddcd4
children 39ab194bbbef
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 ncurses; 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 @@ -68,2 +68,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 # Creat /dev/cdrom if needed (symlink does not exist on LiveCD). Chmod
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 }