wok-current annotate slitaz-base-files/receipt @ rev 18522
xchm: typo
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Oct 26 11:47:37 2015 +0200 (2015-10-26) |
parents | b62f93de1a4e |
children | ca7093b3e625 |
rev | line source |
---|---|
pankso@1 | 1 # SliTaz package receipt. |
pankso@1 | 2 |
pankso@1 | 3 PACKAGE="slitaz-base-files" |
al@18479 | 4 VERSION="286" |
pankso@1 | 5 CATEGORY="base-system" |
pankso@1 | 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" |
gokhlayeh@8012 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@1 | 10 WEB_SITE="http://www.slitaz.org/" |
pascal@13580 | 11 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz" |
pankso@12856 | 12 HOST_ARCH="i486 arm" |
pankso@12856 | 13 |
pankso@12856 | 14 DEPENDS="gettext-base" |
pankso@12856 | 15 |
pascal@1212 | 16 CONFIG_FILES=" |
pascal@1212 | 17 /etc/adduser.conf |
pascal@1212 | 18 /etc/passwd |
pascal@1212 | 19 /etc/fstab |
pascal@1212 | 20 /etc/issue |
pascal@1212 | 21 /etc/hosts |
pascal@1212 | 22 /etc/host.conf |
pascal@1212 | 23 /etc/hostname |
pascal@1212 | 24 /etc/group |
pascal@1212 | 25 /etc/gshadow |
pascal@1212 | 26 /etc/shadow |
pascal@1212 | 27 /etc/daemons.conf |
pascal@1212 | 28 /etc/nsswitch.conf |
pascal@1212 | 29 /etc/networks |
pascal@1212 | 30 /etc/profile |
pascal@1212 | 31 /etc/securetty |
pascal@1212 | 32 /etc/services |
pascal@1212 | 33 /etc/shells" |
pankso@1 | 34 |
pankso@12664 | 35 # Rules to configure and make the package. |
pankso@12664 | 36 compile_rules() |
pankso@12664 | 37 { |
pankso@12664 | 38 make DESTDIR=$DESTDIR install |
pankso@12664 | 39 } |
pankso@12664 | 40 |
pankso@1 | 41 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@1 | 42 genpkg_rules() |
pankso@1 | 43 { |
pankso@131 | 44 mkdir -p \ |
pankso@132 | 45 $fs/bin \ |
pankso@132 | 46 $fs/dev \ |
pankso@132 | 47 $fs/home \ |
pankso@132 | 48 $fs/media/cdrom \ |
pankso@132 | 49 $fs/media/flash \ |
pankso@132 | 50 $fs/media/usbdisk \ |
pankso@132 | 51 $fs/mnt \ |
pankso@132 | 52 $fs/proc \ |
pankso@132 | 53 $fs/root \ |
pascal@12984 | 54 $fs/run \ |
pankso@132 | 55 $fs/sbin \ |
pankso@132 | 56 $fs/sys \ |
pankso@132 | 57 $fs/tmp \ |
pankso@132 | 58 $fs/usr/bin \ |
pankso@132 | 59 $fs/usr/games \ |
pankso@132 | 60 $fs/usr/lib \ |
pankso@132 | 61 $fs/usr/sbin \ |
pankso@132 | 62 $fs/usr/share/doc \ |
pankso@132 | 63 $fs/var/cache \ |
pankso@132 | 64 $fs/var/games \ |
pankso@132 | 65 $fs/var/lib \ |
pankso@132 | 66 $fs/var/lock \ |
pankso@12664 | 67 $fs/var/log/slitaz \ |
pankso@132 | 68 $fs/var/spool \ |
pankso@16572 | 69 $fs/var/tmp \ |
pankso@16572 | 70 $fs/var/run |
pankso@801 | 71 |
pankso@16572 | 72 # Daemons may store the pid files in /var/run |
al@18479 | 73 # from 5.0 /var/run is mounted as tmpfs |
pankso@16572 | 74 #ln -s /run $fs/var/run |
pascal@15920 | 75 |
pankso@12664 | 76 # Copy all installed files and set permissions. |
pankso@12664 | 77 cp -a $install/* $fs |
pankso@801 | 78 |
pankso@1 | 79 chown -R root.root $fs/* |
pankso@1 | 80 chmod 1777 $fs/tmp |
al@18479 | 81 chmod 640 $fs/etc/shadow |
al@18479 | 82 chmod 640 $fs/etc/gshadow |
pankso@607 | 83 chmod 0750 $fs/root |
pankso@801 | 84 |
slaxemulator@8726 | 85 # Populate /dev with $fs/sbin/mktazdevs.sh. |
slaxemulator@8726 | 86 $fs/sbin/mktazdevs.sh $fs/dev |
pankso@801 | 87 |
al@18009 | 88 # Create /etc/mtab symlink. |
pankso@1 | 89 cd $fs/etc |
pankso@1 | 90 ln -s /proc/mounts mtab |
pankso@12664 | 91 |
pankso@12664 | 92 # Fix httphelper link |
pankso@12664 | 93 cd $fs/usr/lib/slitaz |
pascal@12795 | 94 ln -s httphelper.sh httphelper |
pascal@18006 | 95 |
pascal@18006 | 96 # Update copyright year |
pascal@18007 | 97 grep -rl 'copy; 2' $fs/var/www | xargs \ |
pascal@18006 | 98 sed -i "s/copy; [0-9]*/copy; $(date +%Y)/" |
pankso@1 | 99 } |
pankso@1 | 100 |
pankso@1 | 101 # Pre and post install to backup all /etc/settings |
pankso@1 | 102 # |
pankso@1 | 103 pre_install() |
pankso@1 | 104 { |
al@18472 | 105 cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null |
al@18472 | 106 [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig" |
pankso@16573 | 107 # Remove old /var/run symlink |
al@18479 | 108 [ -h "$1/var/run" ] && rm -f "$1/var/run" |
pankso@1 | 109 } |
pankso@1 | 110 |
pankso@1 | 111 post_install() |
pankso@1 | 112 { |
al@18472 | 113 cp -a "$1/tmp/etc.bak"/* "$1/etc" 2>/dev/null |
al@18472 | 114 rm -r "$1/tmp/etc.bak" |
al@18472 | 115 |
al@18472 | 116 [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo" |
pankso@801 | 117 |
pankso@1 | 118 # Reset permission. |
al@18472 | 119 chmod 640 "$1/etc/shadow" |
al@18472 | 120 chmod 640 "$1/etc/gshadow" |
pankso@801 | 121 |
al@18472 | 122 if ! grep -q audio "$1/etc/group"; then |
al@18472 | 123 chroot "$1/" /bin/addgroup -g 20 audio |
pankso@1 | 124 fi |
pankso@1 | 125 } |
pascal@8932 | 126 |
pascal@8932 | 127 pre_remove() |
pascal@8932 | 128 { |
al@18009 | 129 # We can not remove this package! |
pascal@8932 | 130 exit 1 |
pascal@8932 | 131 } |