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

Small updates.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 30 01:34:53 2018 +0200 (2018-11-30)
parents d5aab818505e
children e19ff076dc63
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 BUILD_DEPENDS="gettext-dev"
18 compile_rules() {
19 make DESTDIR=$install install
21 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \
22 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \
23 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \
24 /var/spool /var/tmp /var/run
25 do
26 mkdir -p $install$i
27 done
29 # Create /etc/mtab symlink
30 ln -s /proc/mounts $install/etc/mtab
32 # Add httphelper link
33 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper
35 # Populate /dev with $fs/sbin/mktazdevs.sh.
36 # Not required with udev.
37 # $fs/sbin/mktazdevs.sh $fs/dev
39 # Update copyright year
40 grep -rl 'copy; 2' $install/var/www | xargs \
41 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
43 # Set release
44 echo 'next' > $install/etc/slitaz-release
45 # Set mirror1 as default mirror
46 sed -i 's|mirror\.slitaz\.org|mirror1.slitaz.org|' $install/etc/slitaz/slitaz.conf
48 # Set arch
49 sed -i "s|SLITAZ_ARCH=.*|SLITAZ_ARCH=\"$ARCH\"|" $install/etc/slitaz/slitaz.conf
51 chown -R root:root $install
52 chmod 1777 $install/tmp
53 chmod 640 $install/etc/shadow
54 chmod 640 $install/etc/gshadow
55 chmod 0750 $install/root
56 }
58 genpkg_rules() {
59 cp -a $install/* $fs
60 DEPENDS="gettext-base"
61 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \
62 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \
63 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \
64 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \
65 /etc/slitaz/slitaz.conf /etc/sysctl.conf"
66 }
68 # Pre and post install to backup all /etc settings
69 #
70 pre_install() {
71 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
72 # Remove old /var/run symlink
73 [ -h "$1/var/run" ] && rm -f "$1/var/run"
74 :
75 }
77 post_install() {
78 [ -x "$1/usr/bin/sudo.orig" ] &&
79 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
81 # Reset permission.
82 chmod 640 "$1/etc/shadow"
83 chmod 640 "$1/etc/gshadow"
85 if ! grep -q audio "$1/etc/group"; then
86 chroot "$1/" /bin/addgroup -g 20 audio
87 fi
88 }
90 # We can not remove this package!
91 pre_remove() {
92 return 1
93 }