wok-next view slitaz-base-files/receipt @ rev 19636
Update licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Feb 10 13:19:07 2017 +0100 (2017-02-10) |
parents | 5b8c4b9a879c |
children | eb23a9b0f828 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="323"
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 WEB_SITE="http://www.slitaz.org/"
10 HOST_ARCH="i486 arm"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2"
15 DEPENDS="gettext-base"
17 CONFIG_FILES="
18 /etc/adduser.conf
19 /etc/passwd
20 /etc/fstab
21 /etc/issue
22 /etc/hosts
23 /etc/host.conf
24 /etc/hostname
25 /etc/group
26 /etc/gshadow
27 /etc/shadow
28 /etc/daemons.conf
29 /etc/nsswitch.conf
30 /etc/networks
31 /etc/profile
32 /etc/securetty
33 /etc/services
34 /etc/shells"
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 make DESTDIR=$DESTDIR install
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p \
46 $fs/bin \
47 $fs/dev \
48 $fs/home \
49 $fs/media/cdrom \
50 $fs/media/flash \
51 $fs/media/usbdisk \
52 $fs/mnt \
53 $fs/proc \
54 $fs/root \
55 $fs/run \
56 $fs/sbin \
57 $fs/sys \
58 $fs/tmp \
59 $fs/usr/bin \
60 $fs/usr/games \
61 $fs/usr/lib \
62 $fs/usr/sbin \
63 $fs/usr/share/doc \
64 $fs/var/cache \
65 $fs/var/games \
66 $fs/var/lib \
67 $fs/var/lock \
68 $fs/var/log/slitaz \
69 $fs/var/spool \
70 $fs/var/tmp \
71 $fs/var/run
73 # Daemons may store the pid files in /var/run
74 # from 5.0 /var/run is mounted as tmpfs
75 #ln -s /run $fs/var/run
77 # Copy all installed files and set permissions.
78 cp -a $install/* $fs
80 chown -R root.root $fs/*
81 chmod 1777 $fs/tmp
82 chmod 640 $fs/etc/shadow
83 chmod 640 $fs/etc/gshadow
84 chmod 0750 $fs/root
86 # Populate /dev with $fs/sbin/mktazdevs.sh.
87 $fs/sbin/mktazdevs.sh $fs/dev
89 # Create /etc/mtab symlink.
90 cd $fs/etc
91 ln -s /proc/mounts mtab
93 # Fix httphelper link
94 cd $fs/usr/lib/slitaz
95 ln -s httphelper.sh httphelper
97 # Update copyright year
98 grep -rl 'copy; 2' $fs/var/www | xargs \
99 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
100 }
102 # Pre and post install to backup all /etc/settings
103 #
104 pre_install()
105 {
106 cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null
107 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
108 # Remove old /var/run symlink
109 [ -h "$1/var/run" ] && rm -f "$1/var/run"
110 :
111 }
113 post_install()
114 {
115 if cp -a "$1/tmp/etc.bak"/* "$1/etc"; then
116 rm -r "$1/tmp/etc.bak"
117 fi 2>/dev/null
119 [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
121 # Reset permission.
122 chmod 640 "$1/etc/shadow"
123 chmod 640 "$1/etc/gshadow"
125 if ! grep -q audio "$1/etc/group"; then
126 chroot "$1/" /bin/addgroup -g 20 audio
127 fi
128 }
130 pre_remove()
131 {
132 # We can not remove this package!
133 exit 1
134 }