wok-4.x view slitaz-base-files/receipt @ rev 5996

lirc: Upgrade to 0.8.6
author Matthew Sheets <rcx@zoominternet.net>
date Sat Aug 14 14:28:10 2010 +0000 (2010-08-14)
parents 58cd2870b134
children fcba70067243
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="4.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 chroot $root/ /bin/addgroup -g 20 audio
102 fi
104 # daemons.conf (tftp + dnsd)
105 if ! grep -q ^TFTPD_OPTIONS $root/etc/daemons.conf; then
106 echo '# Tftp daemon options.' >> $root/etc/daemons.conf
107 echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf
108 echo '' >> $root/etc/daemons.conf
109 fi
110 if ! grep -q ^DNSD_OPTIONS $root/etc/daemons.conf; then
111 echo '# Domain name server options.' >> $root/etc/daemons.conf
112 echo 'DNSD_OPTIONS="-d"' >> $root/etc/daemons.conf
113 echo '' >> $root/etc/daemons.conf
114 fi
115 }