wok view slitaz-base-files/receipt @ rev 3995

h8300-gcc: fix FSH
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 30 13:02:52 2009 +0200 (2009-08-30)
parents cf71613b81e7
children 7bbf30a4498b
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="3.0"
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://mirror.slitaz.org/sources/base-files/$TARBALL"
11 CONFIG_FILES="
12 /etc/adduser.conf
13 /etc/passwd
14 /etc/fstab
15 /etc/issue
16 /etc/hosts
17 /etc/host.conf
18 /etc/hostname
19 /etc/group
20 /etc/gshadow
21 /etc/shadow
22 /etc/daemons.conf
23 /etc/nsswitch.conf
24 /etc/networks
25 /etc/profile
26 /etc/securetty
27 /etc/services
28 /etc/shells"
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p \
34 $fs/bin \
35 $fs/dev \
36 $fs/home \
37 $fs/media/cdrom \
38 $fs/media/flash \
39 $fs/media/usbdisk \
40 $fs/mnt \
41 $fs/proc \
42 $fs/root \
43 $fs/sbin \
44 $fs/sys \
45 $fs/tmp \
46 $fs/usr/bin \
47 $fs/usr/games \
48 $fs/usr/lib \
49 $fs/usr/local \
50 $fs/usr/sbin \
51 $fs/usr/share/doc \
52 $fs/var/cache \
53 $fs/var/games \
54 $fs/var/lib \
55 $fs/var/lock \
56 $fs/var/log \
57 $fs/var/run \
58 $fs/var/spool \
59 $fs/var/tmp
61 # Copy all rootfs from the stuff and set permissions.
62 cp -a $src/rootfs/* $fs
64 chown -R root.root $fs/*
65 chmod 1777 $fs/tmp
66 chmod 640 $fs/etc/shadow
67 chmod 640 $fs/etc/gshadow
68 chmod 0750 $fs/root
70 # Populate /dev with /$fs/sbin/mktazdevs.sh.
71 ./$fs/sbin/mktazdevs.sh $fs/dev
73 # Creat /etc/mtab symlink.
74 cd $fs/etc
75 ln -s /proc/mounts mtab
76 }
78 # Pre and post install to backup all /etc/settings
79 #
80 pre_install()
81 {
82 local root
83 root=$1
84 echo "Creating backup of all files in /etc..."
85 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null
86 }
88 post_install()
89 {
90 local root
91 root=$1
92 echo "Restoring files from /etc/etc.bak..."
93 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null
94 rm -rf $root/tmp/etc.bak
96 # Reset permission.
97 chmod 640 $root/etc/shadow
98 chmod 640 $root/etc/gshadow
100 if ! grep -q audio $root/etc/group; then
101 if [ -n "$root" ]; then
102 cp /etc/group $root/etc/group
103 else
104 addgroup -g 20 audio
105 fi
106 fi
108 # daemons.conf (tftp + dnsd)
109 if ! grep -q ^TFTPD_OPTIONS $root/etc/daemons.conf; then
110 echo '# Tftp daemon options.' >> $root/etc/daemons.conf
111 echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf
112 echo '' >> $root/etc/daemons.conf
113 fi
114 if ! grep -q ^DNSD_OPTIONS $root/etc/daemons.conf; then
115 echo '# Domain name server options.' >> $root/etc/daemons.conf
116 echo 'DNSD_OPTIONS="-d"' >> $root/etc/daemons.conf
117 echo '' >> $root/etc/daemons.conf
118 fi
119 }
121 # We need this package on build host to install it in target directory
122 SELF_INSTALL=1