wok-6.x annotate slitaz-base-files/receipt @ rev 12664
slitaz-base-files: use make install in receipt
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 01 10:49:18 2012 +0200 (2012-05-01) |
parents | e1f9ca63ce54 |
children | b981e20f2719 |
rev | line source |
---|---|
pankso@1 | 1 # SliTaz package receipt. |
pankso@1 | 2 |
pankso@1 | 3 PACKAGE="slitaz-base-files" |
pankso@12659 | 4 VERSION="5.2" |
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" |
gokhlayeh@8012 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@1 | 9 WEB_SITE="http://www.slitaz.org/" |
gokhlayeh@8012 | 10 WGET_URL="http://mirror.slitaz.org/sources/base-files/$TARBALL" |
pascal@1212 | 11 CONFIG_FILES=" |
pascal@1212 | 12 /etc/adduser.conf |
pascal@1212 | 13 /etc/passwd |
pascal@1212 | 14 /etc/fstab |
pascal@1212 | 15 /etc/issue |
pascal@1212 | 16 /etc/hosts |
pascal@1212 | 17 /etc/host.conf |
pascal@1212 | 18 /etc/hostname |
pascal@1212 | 19 /etc/group |
pascal@1212 | 20 /etc/gshadow |
pascal@1212 | 21 /etc/shadow |
pascal@1212 | 22 /etc/daemons.conf |
pascal@1212 | 23 /etc/nsswitch.conf |
pascal@1212 | 24 /etc/networks |
pascal@1212 | 25 /etc/profile |
pascal@1212 | 26 /etc/securetty |
pascal@1212 | 27 /etc/services |
pascal@1212 | 28 /etc/shells" |
pankso@1 | 29 |
pankso@12664 | 30 # Rules to configure and make the package. |
pankso@12664 | 31 compile_rules() |
pankso@12664 | 32 { |
pankso@12664 | 33 cd $src |
pankso@12664 | 34 make DESTDIR=$DESTDIR install |
pankso@12664 | 35 } |
pankso@12664 | 36 |
pankso@1 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@1 | 38 genpkg_rules() |
pankso@1 | 39 { |
pankso@131 | 40 mkdir -p \ |
pankso@132 | 41 $fs/bin \ |
pankso@132 | 42 $fs/dev \ |
pankso@132 | 43 $fs/home \ |
pankso@132 | 44 $fs/media/cdrom \ |
pankso@132 | 45 $fs/media/flash \ |
pankso@132 | 46 $fs/media/usbdisk \ |
pankso@132 | 47 $fs/mnt \ |
pankso@132 | 48 $fs/proc \ |
pankso@132 | 49 $fs/root \ |
pankso@132 | 50 $fs/sbin \ |
pankso@132 | 51 $fs/sys \ |
pankso@132 | 52 $fs/tmp \ |
pankso@132 | 53 $fs/usr/bin \ |
pankso@132 | 54 $fs/usr/games \ |
pankso@132 | 55 $fs/usr/lib \ |
pankso@132 | 56 $fs/usr/local \ |
pankso@132 | 57 $fs/usr/sbin \ |
pankso@132 | 58 $fs/usr/share/doc \ |
pankso@132 | 59 $fs/var/cache \ |
pankso@132 | 60 $fs/var/games \ |
pankso@132 | 61 $fs/var/lib \ |
pankso@132 | 62 $fs/var/lock \ |
pankso@12664 | 63 $fs/var/log/slitaz \ |
pankso@132 | 64 $fs/var/run \ |
pankso@132 | 65 $fs/var/spool \ |
pankso@801 | 66 $fs/var/tmp |
pankso@801 | 67 |
pankso@12664 | 68 # Copy all installed files and set permissions. |
pankso@12664 | 69 cp -a $install/* $fs |
pankso@801 | 70 |
pankso@1 | 71 chown -R root.root $fs/* |
pankso@1 | 72 chmod 1777 $fs/tmp |
pankso@1 | 73 chmod 640 $fs/etc/shadow |
pankso@1 | 74 chmod 640 $fs/etc/gshadow |
pankso@607 | 75 chmod 0750 $fs/root |
pankso@801 | 76 |
slaxemulator@8726 | 77 # Populate /dev with $fs/sbin/mktazdevs.sh. |
slaxemulator@8726 | 78 $fs/sbin/mktazdevs.sh $fs/dev |
pankso@801 | 79 |
pankso@1 | 80 # Creat /etc/mtab symlink. |
pankso@1 | 81 cd $fs/etc |
pankso@1 | 82 ln -s /proc/mounts mtab |
pankso@12664 | 83 |
pankso@12664 | 84 # Fix httphelper link |
pankso@12664 | 85 cd $fs/usr/lib/slitaz |
pankso@12664 | 86 rm httphelper && ln -s httphelper.sh httphelper |
pankso@1 | 87 } |
pankso@1 | 88 |
pankso@1 | 89 # Pre and post install to backup all /etc/settings |
pankso@1 | 90 # |
pankso@1 | 91 pre_install() |
pankso@1 | 92 { |
pankso@1 | 93 local root |
pankso@1 | 94 root=$1 |
pankso@52 | 95 echo "Creating backup of all files in /etc..." |
pankso@52 | 96 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null |
pankso@1 | 97 } |
pankso@1 | 98 |
pankso@1 | 99 post_install() |
pankso@1 | 100 { |
pankso@1 | 101 local root |
pankso@1 | 102 root=$1 |
pankso@52 | 103 echo "Restoring files from /etc/etc.bak..." |
pankso@52 | 104 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null |
pankso@1 | 105 rm -rf $root/tmp/etc.bak |
pankso@801 | 106 |
pankso@1 | 107 # Reset permission. |
pankso@1 | 108 chmod 640 $root/etc/shadow |
pankso@1 | 109 chmod 640 $root/etc/gshadow |
pankso@801 | 110 |
pankso@1 | 111 if ! grep -q audio $root/etc/group; then |
pascal@5125 | 112 chroot $root/ /bin/addgroup -g 20 audio |
pankso@1 | 113 fi |
pankso@1 | 114 } |
pascal@8932 | 115 |
pascal@8932 | 116 pre_remove() |
pascal@8932 | 117 { |
pascal@8932 | 118 # We can not remove this package ! |
pascal@8932 | 119 exit 1 |
pascal@8932 | 120 } |