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

gdb: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 22 21:23:15 2017 +0200 (2017-10-22)
parents 6d2b71cbba60
children 0709fcf9b0d7
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
47 chown -R root:root $install
48 chmod 1777 $install/tmp
49 chmod 640 $install/etc/shadow
50 chmod 640 $install/etc/gshadow
51 chmod 0750 $install/root
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 cp -a $install/* $fs
58 DEPENDS="gettext-base"
59 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \
60 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \
61 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \
62 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \
63 /etc/slitaz/slitaz.conf /etc/sysctl.conf"
64 }
66 # Pre and post install to backup all /etc settings
67 #
68 pre_install() {
69 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig"
70 # Remove old /var/run symlink
71 [ -h "$1/var/run" ] && rm -f "$1/var/run"
72 :
73 }
75 post_install() {
76 [ -x "$1/usr/bin/sudo.orig" ] &&
77 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo"
79 # Reset permission.
80 chmod 640 "$1/etc/shadow"
81 chmod 640 "$1/etc/gshadow"
83 if ! grep -q audio "$1/etc/group"; then
84 chroot "$1/" /bin/addgroup -g 20 audio
85 fi
86 }
88 # We can not remove this package!
89 pre_remove() {
90 exit 1
91 }