wok-next annotate slitaz-loram/receipt @ rev 229

Add: slitaz-loram
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 16 16:18:57 2008 +0100 (2008-02-16)
parents
children 0257ebeb385f
rev   line source
pascal@229 1 # SliTaz package receipt.
pascal@229 2
pascal@229 3 PACKAGE="slitaz-loram"
pascal@229 4 VERSION="1.0"
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@229 14 cat > $fs/etc/tazlito/loram.rootfs << EOF
pascal@229 15 mksquashfs usr .usr.sqfs && rm -rf usr/* && COMPRESSION="none"
pascal@229 16 EOF
pascal@229 17 }
pascal@229 18
pascal@229 19 get_patch()
pascal@229 20 {
pascal@229 21 cat <<EOF
pascal@229 22 --- /etc/init.d/rcS
pascal@229 23 +++ /etc/init.d/rcS
pascal@229 24 @@ -79,2 +79,7 @@
pascal@229 25
pascal@229 26 +# Mount compressed /usr
pascal@229 27 +if [ -f /.usr.sqfs ]; then
pascal@229 28 + /bin/mount -o loop,ro -t squashfs /.usr.sqfs /usr
pascal@229 29 +fi
pascal@229 30 +
pascal@229 31 # Handle kernel cmdline parameter config=<device>,<path> to source a
pascal@229 32 EOF
pascal@229 33 }
pascal@229 34
pascal@229 35 # Pre and post install commands for Tazpkg.
pascal@229 36 post_install()
pascal@229 37 {
pascal@229 38 get_patch | patch -p0
pascal@229 39 }
pascal@229 40
pascal@229 41 # Pre remove commands for Tazpkg.
pascal@229 42 pre_remove()
pascal@229 43 {
pascal@229 44 get_patch | patch -R -p0
pascal@229 45 }