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

Up cookutils, libgphoto2, slitaz-base-files, tazlito
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Sep 08 14:18:05 2017 +0300 (2017-09-08)
parents 35faee9ea669
children 9bfc85b0324c
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-base-files"
4 VERSION="330"
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"
16 BUILD_DEPENDS="gettext"
18 CONFIG_FILES="
19 /etc/adduser.conf
20 /etc/passwd
21 /etc/fstab
22 /etc/issue
23 /etc/hosts
24 /etc/host.conf
25 /etc/hostname
26 /etc/group
27 /etc/gshadow
28 /etc/shadow
29 /etc/daemons.conf
30 /etc/nsswitch.conf
31 /etc/networks
32 /etc/profile
33 /etc/securetty
34 /etc/services
35 /etc/shells"
37 # Rules to configure and make the package.
38 compile_rules()
39 {
40 make DESTDIR=$DESTDIR install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p \
47 $fs/bin \
48 $fs/dev \
49 $fs/home \
50 $fs/media/cdrom \
51 $fs/media/flash \
52 $fs/media/usbdisk \
53 $fs/mnt \
54 $fs/proc \
55 $fs/root \
56 $fs/run \
57 $fs/sbin \
58 $fs/sys \
59 $fs/tmp \
60 $fs/usr/bin \
61 $fs/usr/games \
62 $fs/usr/lib \
63 $fs/usr/sbin \
64 $fs/usr/share/doc \
65 $fs/var/cache \
66 $fs/var/games \
67 $fs/var/lib \
68 $fs/var/lock \
69 $fs/var/log/slitaz \
70 $fs/var/spool \
71 $fs/var/tmp \
72 $fs/var/run
74 # Daemons may store the pid files in /var/run
75 # from 5.0 /var/run is mounted as tmpfs
76 #ln -s /run $fs/var/run
78 # Copy all installed files and set permissions.
79 cp -a $install/* $fs
81 chown -R root.root $fs/*
82 chmod 1777 $fs/tmp
83 chmod 640 $fs/etc/shadow
84 chmod 640 $fs/etc/gshadow
85 chmod 0750 $fs/root
87 # Populate /dev with $fs/sbin/mktazdevs.sh.
88 $fs/sbin/mktazdevs.sh $fs/dev
90 # Create /etc/mtab symlink.
91 cd $fs/etc
92 ln -s /proc/mounts mtab
94 # Fix httphelper link
95 cd $fs/usr/lib/slitaz
96 ln -s httphelper.sh httphelper
98 # Update copyright year
99 grep -rl 'copy; 2' $fs/var/www | xargs \
100 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
102 echo 'next' > $install/etc/slitaz-release
103 }
105 # Pre and post install to backup all /etc/settings
106 #
107 pre_install()
108 {
109 cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null
110 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
111 # Remove old /var/run symlink
112 [ -h "$1/var/run" ] && rm -f "$1/var/run"
113 :
114 }
116 post_install()
117 {
118 if cp -a "$1/tmp/etc.bak"/* "$1/etc"; then
119 rm -r "$1/tmp/etc.bak"
120 fi 2>/dev/null
122 [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
124 # Reset permission.
125 chmod 640 "$1/etc/shadow"
126 chmod 640 "$1/etc/gshadow"
128 if ! grep -q audio "$1/etc/group"; then
129 chroot "$1/" /bin/addgroup -g 20 audio
130 fi
131 }
133 pre_remove()
134 {
135 # We can not remove this package!
136 exit 1
137 }