wok-next view slitaz-base-files/receipt @ rev 20317
Up kmod, lxqt, oxygen-icons, slitaz-base-files, slitaz-configs; add eggwm-qt5, pencil2d.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 11 16:06:23 2017 +0200 (2017-11-11) |
parents | ec4ebc01cb25 |
children | 0e7893ac206d |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-base-files"
4 VERSION="333"
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 BUILD_DEPENDS="gettext"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 make DESTDIR=$install install
22 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \
23 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \
24 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \
25 /var/spool /var/tmp /var/run
26 do
27 mkdir -p $install$i
28 done
30 # Create /etc/mtab symlink
31 ln -s /proc/mounts $install/etc/mtab
33 # Add httphelper link
34 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper
36 # Populate /dev with $fs/sbin/mktazdevs.sh.
37 # Not required with udev.
38 # $fs/sbin/mktazdevs.sh $fs/dev
40 # Update copyright year
41 grep -rl 'copy; 2' $install/var/www | xargs \
42 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/"
44 # Set release
45 echo 'next' > $install/etc/slitaz-release
46 # Set mirror1 as default mirror
47 sed -i 's|mirror\.slitaz\.org|mirror1.slitaz.org|' $install/etc/slitaz/slitaz.conf
49 chown -R root:root $install
50 chmod 1777 $install/tmp
51 chmod 640 $install/etc/shadow
52 chmod 640 $install/etc/gshadow
53 chmod 0750 $install/root
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
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 exit 1
93 }