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