wok-next view slitaz-base-files/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents e7e7475e84c9
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-base-files"
4 VERSION="337"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux tree and the necessary files for the base system"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="BSD GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 #HOST_ARCH="any"
11 REPOLOGY="-"
13 TARBALL="$PACKAGE-$VERSION.tar.bz2"
14 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2"
16 COOKOPTS="force-arch" # different slitaz.conf
18 BUILD_DEPENDS="gettext-dev"
20 compile_rules() {
21 make DESTDIR=$install install
23 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \
24 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \
25 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \
26 /var/spool /var/tmp /var/run
27 do
28 mkdir -p $install$i
29 done
31 # Create /etc/mtab symlink
32 ln -s /proc/mounts $install/etc/mtab
34 # Add httphelper link
35 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper
37 # Populate /dev with $fs/sbin/mktazdevs.sh.
38 # Not required with udev.
39 # $fs/sbin/mktazdevs.sh $fs/dev
41 # Update copyright year
42 grep -rl 'copy; 2' $install/var/www | xargs \
43 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
45 # Set release
46 echo 'next' > $install/etc/slitaz-release
47 # Set mirror1 as default mirror
48 sed -i 's|mirror\.slitaz\.org|mirror1.slitaz.org|' $install/etc/slitaz/slitaz.conf
50 # Set arch
51 sed -i "s|SLITAZ_ARCH=.*|SLITAZ_ARCH=\"$ARCH\"|" $install/etc/slitaz/slitaz.conf
53 chown -R root:root $install
54 chmod 1777 $install/tmp
55 chmod 640 $install/etc/shadow
56 chmod 640 $install/etc/gshadow
57 chmod 0750 $install/root
58 }
60 genpkg_rules() {
61 cp -a $install/* $fs
62 DEPENDS="gettext-base"
63 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \
64 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \
65 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \
66 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \
67 /etc/slitaz/slitaz.conf /etc/sysctl.conf"
68 }
70 # Pre and post install to backup all /etc settings
71 #
72 pre_install() {
73 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
74 # Remove old /var/run symlink
75 [ -h "$1/var/run" ] && rm -f "$1/var/run"
76 :
77 }
79 post_install() {
80 [ -x "$1/usr/bin/sudo.orig" ] &&
81 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
83 # Reset permission.
84 chmod 640 "$1/etc/shadow"
85 chmod 640 "$1/etc/gshadow"
87 if ! grep -q audio "$1/etc/group"; then
88 chroot "$1/" /bin/addgroup -g 20 audio
89 fi
90 }
92 # We can not remove this package!
93 pre_remove() {
94 return 1
95 }