wok-next annotate slitaz-base-files/receipt @ rev 20113
Add some bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Oct 30 09:29:31 2017 +0100 (2017-10-30) |
parents | 6d2b71cbba60 |
children | 0709fcf9b0d7 |
rev | line source |
---|---|
al@19863 | 1 # SliTaz package receipt v2. |
pankso@1 | 2 |
pankso@1 | 3 PACKAGE="slitaz-base-files" |
al@19881 | 4 VERSION="333" |
pankso@1 | 5 CATEGORY="base-system" |
al@19863 | 6 SHORT_DESC="Linux tree and the necessary files for the base system" |
pankso@1 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15021 | 8 LICENSE="BSD GPL3" |
pankso@1 | 9 WEB_SITE="http://www.slitaz.org/" |
pankso@12856 | 10 HOST_ARCH="i486 arm" |
pankso@12856 | 11 |
al@19588 | 12 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
al@19588 | 13 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.bz2" |
al@19588 | 14 |
al@19653 | 15 BUILD_DEPENDS="gettext" |
pankso@12856 | 16 |
pankso@12664 | 17 # Rules to configure and make the package. |
pankso@12664 | 18 compile_rules() |
pankso@12664 | 19 { |
al@19863 | 20 make DESTDIR=$install install |
al@19863 | 21 |
al@19863 | 22 for i in /bin /dev /home /media/cdrom /media/flash /media/usbdisk /mnt \ |
al@19863 | 23 /proc /root /run /sbin /sys /tmp /usr/bin /usr/games /usr/lib /usr/sbin \ |
al@19863 | 24 /usr/share/doc /var/cache /var/games /var/lib /var/lock /var/log/slitaz \ |
al@19863 | 25 /var/spool /var/tmp /var/run |
al@19863 | 26 do |
al@19863 | 27 mkdir -p $install$i |
al@19863 | 28 done |
al@19863 | 29 |
al@19863 | 30 # Create /etc/mtab symlink |
al@19863 | 31 ln -s /proc/mounts $install/etc/mtab |
al@19863 | 32 |
al@19863 | 33 # Add httphelper link |
al@19863 | 34 ln -s httphelper.sh $install/usr/lib/slitaz/httphelper |
al@19863 | 35 |
al@19863 | 36 # Populate /dev with $fs/sbin/mktazdevs.sh. |
al@19863 | 37 # Not required with udev. |
al@19863 | 38 # $fs/sbin/mktazdevs.sh $fs/dev |
al@19863 | 39 |
al@19863 | 40 # Update copyright year |
al@19864 | 41 grep -rl 'copy; 2' $install/var/www | xargs \ |
al@19863 | 42 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/" |
al@19863 | 43 |
al@19863 | 44 # Set release |
al@19865 | 45 echo 'next' > $install/etc/slitaz-release |
al@19863 | 46 |
al@19863 | 47 chown -R root:root $install |
al@19863 | 48 chmod 1777 $install/tmp |
al@19863 | 49 chmod 640 $install/etc/shadow |
al@19863 | 50 chmod 640 $install/etc/gshadow |
al@19863 | 51 chmod 0750 $install/root |
pankso@12664 | 52 } |
pankso@12664 | 53 |
pankso@1 | 54 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@1 | 55 genpkg_rules() |
pankso@1 | 56 { |
pankso@12664 | 57 cp -a $install/* $fs |
al@19863 | 58 DEPENDS="gettext-base" |
al@19881 | 59 CONFIG_FILES="/etc/adduser.conf /etc/daemons.conf /etc/fstab /etc/group \ |
al@19881 | 60 /etc/gshadow /etc/host.conf /etc/hostname /etc/hosts /etc/issue /etc/motd \ |
al@19881 | 61 /etc/networks /etc/nsswitch.conf /etc/passwd /etc/profile /etc/securetty \ |
al@19881 | 62 /etc/services /etc/shadow /etc/shells /etc/slitaz-release \ |
al@19881 | 63 /etc/slitaz/slitaz.conf /etc/sysctl.conf" |
pankso@1 | 64 } |
pankso@1 | 65 |
al@19863 | 66 # Pre and post install to backup all /etc settings |
pankso@1 | 67 # |
al@19863 | 68 pre_install() { |
al@18472 | 69 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig" |
pankso@16573 | 70 # Remove old /var/run symlink |
al@18479 | 71 [ -h "$1/var/run" ] && rm -f "$1/var/run" |
al@18582 | 72 : |
pankso@1 | 73 } |
pankso@1 | 74 |
al@19863 | 75 post_install() { |
al@19863 | 76 [ -x "$1/usr/bin/sudo.orig" ] && |
al@19863 | 77 mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo" |
pankso@801 | 78 |
pankso@1 | 79 # Reset permission. |
al@18472 | 80 chmod 640 "$1/etc/shadow" |
al@18472 | 81 chmod 640 "$1/etc/gshadow" |
pankso@801 | 82 |
al@18472 | 83 if ! grep -q audio "$1/etc/group"; then |
al@18472 | 84 chroot "$1/" /bin/addgroup -g 20 audio |
pankso@1 | 85 fi |
pankso@1 | 86 } |
pascal@8932 | 87 |
al@19863 | 88 # We can not remove this package! |
al@19863 | 89 pre_remove() { |
pascal@8932 | 90 exit 1 |
pascal@8932 | 91 } |