wok-next view slitaz-base-files/receipt @ rev 20459
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 13:45:43 2018 +0200 (2018-03-02) |
parents | 0709fcf9b0d7 |
children | 1eb4aacb48ed |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-base-files"
4 VERSION="336"
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/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2"
14 BUILD_DEPENDS="gettext"
16 compile_rules() {
17 make DESTDIR=$install install
19 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \
20 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \
21 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \
22 /var/spool /var/tmp /var/run
23 do
24 mkdir -p $install$i
25 done
27 # Create /etc/mtab symlink
28 ln -s /proc/mounts $install/etc/mtab
30 # Add httphelper link
31 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper
33 # Populate /dev with $fs/sbin/mktazdevs.sh.
34 # Not required with udev.
35 # $fs/sbin/mktazdevs.sh $fs/dev
37 # Update copyright year
38 grep -rl 'copy; 2' $install/var/www | xargs \
39 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
41 # Set release
42 echo 'next' > $install/etc/slitaz-release
43 # Set mirror1 as default mirror
44 sed -i 's|mirror\.slitaz\.org|mirror1.slitaz.org|' $install/etc/slitaz/slitaz.conf
46 chown -R root:root $install
47 chmod 1777 $install/tmp
48 chmod 640 $install/etc/shadow
49 chmod 640 $install/etc/gshadow
50 chmod 0750 $install/root
51 }
53 genpkg_rules() {
54 cp -a $install/* $fs
55 DEPENDS="gettext-base"
56 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \
57 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \
58 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \
59 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \
60 /etc/slitaz/slitaz.conf /etc/sysctl.conf"
61 }
63 # Pre and post install to backup all /etc settings
64 #
65 pre_install() {
66 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
67 # Remove old /var/run symlink
68 [ -h "$1/var/run" ] && rm -f "$1/var/run"
69 :
70 }
72 post_install() {
73 [ -x "$1/usr/bin/sudo.orig" ] &&
74 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
76 # Reset permission.
77 chmod 640 "$1/etc/shadow"
78 chmod 640 "$1/etc/gshadow"
80 if ! grep -q audio "$1/etc/group"; then
81 chroot "$1/" /bin/addgroup -g 20 audio
82 fi
83 }
85 # We can not remove this package!
86 pre_remove() {
87 exit 1
88 }