wok view slitaz-base-files/receipt @ rev 19635
Up SliTaz projects: cookutils(867), slitaz-base-files(321), slitaz-boot-scripts(437), slitaz-tools(1009), tazbug(95), tazirc(20), tazlito(448), tazpkg(933).
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jan 17 17:38:43 2017 +0200 (2017-01-17) |
parents | d5add2d69322 |
children | 2f842cf141a8 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="321"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.slitaz.org/"
11 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
12 HOST_ARCH="i486 arm"
14 DEPENDS="gettext-base"
16 CONFIG_FILES="
17 /etc/adduser.conf
18 /etc/passwd
19 /etc/fstab
20 /etc/issue
21 /etc/hosts
22 /etc/host.conf
23 /etc/hostname
24 /etc/group
25 /etc/gshadow
26 /etc/shadow
27 /etc/daemons.conf
28 /etc/nsswitch.conf
29 /etc/networks
30 /etc/profile
31 /etc/securetty
32 /etc/services
33 /etc/shells"
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 make DESTDIR=$DESTDIR install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p \
45 $fs/bin \
46 $fs/dev \
47 $fs/home \
48 $fs/media/cdrom \
49 $fs/media/flash \
50 $fs/media/usbdisk \
51 $fs/mnt \
52 $fs/proc \
53 $fs/root \
54 $fs/run \
55 $fs/sbin \
56 $fs/sys \
57 $fs/tmp \
58 $fs/usr/bin \
59 $fs/usr/games \
60 $fs/usr/lib \
61 $fs/usr/sbin \
62 $fs/usr/share/doc \
63 $fs/var/cache \
64 $fs/var/games \
65 $fs/var/lib \
66 $fs/var/lock \
67 $fs/var/log/slitaz \
68 $fs/var/spool \
69 $fs/var/tmp \
70 $fs/var/run
72 # Daemons may store the pid files in /var/run
73 # from 5.0 /var/run is mounted as tmpfs
74 #ln -s /run $fs/var/run
76 # Copy all installed files and set permissions.
77 cp -a $install/* $fs
79 chown -R root.root $fs/*
80 chmod 1777 $fs/tmp
81 chmod 640 $fs/etc/shadow
82 chmod 640 $fs/etc/gshadow
83 chmod 0750 $fs/root
85 # Populate /dev with $fs/sbin/mktazdevs.sh.
86 $fs/sbin/mktazdevs.sh $fs/dev
88 # Create /etc/mtab symlink.
89 cd $fs/etc
90 ln -s /proc/mounts mtab
92 # Fix httphelper link
93 cd $fs/usr/lib/slitaz
94 ln -s httphelper.sh httphelper
96 # Update copyright year
97 grep -rl 'copy; 2' $fs/var/www | xargs \
98 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
99 }
101 # Pre and post install to backup all /etc/settings
102 #
103 pre_install()
104 {
105 cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null
106 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
107 # Remove old /var/run symlink
108 [ -h "$1/var/run" ] && rm -f "$1/var/run"
109 :
110 }
112 post_install()
113 {
114 if cp -a "$1/tmp/etc.bak"/* "$1/etc"; then
115 rm -r "$1/tmp/etc.bak"
116 fi 2>/dev/null
118 [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
120 # Reset permission.
121 chmod 640 "$1/etc/shadow"
122 chmod 640 "$1/etc/gshadow"
124 if ! grep -q audio "$1/etc/group"; then
125 chroot "$1/" /bin/addgroup -g 20 audio
126 fi
127 }
129 pre_remove()
130 {
131 # We can not remove this package!
132 exit 1
133 }