wok-6.x view slitaz-base-files/receipt @ rev 595

busybox/cpio -o: fix sized dir
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 17 14:33:04 2008 +0000 (2008-04-17)
parents 2ac4fc760d5c
children 0ae3a5e4f21a
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="1.5"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.slitaz.org/"
10 WGET_URL="http://download.tuxfamily.org/slitaz/sources/base-files/$TARBALL"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p \
16 $fs/bin \
17 $fs/dev \
18 $fs/home \
19 $fs/media/cdrom \
20 $fs/media/flash \
21 $fs/media/usbdisk \
22 $fs/mnt \
23 $fs/proc \
24 $fs/root \
25 $fs/sbin \
26 $fs/sys \
27 $fs/tmp \
28 $fs/usr/bin \
29 $fs/usr/games \
30 $fs/usr/lib \
31 $fs/usr/local \
32 $fs/usr/sbin \
33 $fs/usr/share/doc \
34 $fs/var/cache \
35 $fs/var/games \
36 $fs/var/lib \
37 $fs/var/lock \
38 $fs/var/log \
39 $fs/var/run \
40 $fs/var/spool \
41 $fs/var/tmp
43 # Copy all rootfs from the stuff and set permissions.
44 cp -a $src/rootfs/* $fs
46 chown -R root.root $fs/*
47 chmod 1777 $fs/tmp
48 chmod 640 $fs/etc/shadow
49 chmod 640 $fs/etc/gshadow
51 # Populate /dev with /$fs/sbin/mktazdevs.sh.
52 ./$fs/sbin/mktazdevs.sh $fs/dev
54 # Creat /etc/mtab symlink.
55 cd $fs/etc
56 ln -s /proc/mounts mtab
57 }
59 # Pre and post install to backup all /etc/settings
60 #
61 pre_install()
62 {
63 local root
64 root=$1
65 echo "Creating backup of all files in /etc..."
66 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
67 }
69 post_install()
70 {
71 local root
72 root=$1
73 echo "Restoring files from /etc/etc.bak..."
74 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
75 rm -rf $root/tmp/etc.bak
77 # Reset permission.
78 chmod 640 $root/etc/shadow
79 chmod 640 $root/etc/gshadow
81 if ! grep -q audio $root/etc/group; then
82 if [ -n "$root" ]; then
83 cp /etc/group $root/etc/group
84 else
85 addgroup -g 20 audio
86 fi
87 fi
88 }
89 SELF_INSTALL=1