wok-6.x annotate slitaz-base-files/receipt @ rev 15340
ibus: install im-ibus.la
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 29 11:30:44 2013 +0000 (2013-09-29) |
parents | 11f97d50b273 |
children | 89cf79341e90 |
rev | line source |
---|---|
pankso@1 | 1 # SliTaz package receipt. |
pankso@1 | 2 |
pankso@1 | 3 PACKAGE="slitaz-base-files" |
al@15187 | 4 VERSION="5.4.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" |
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 cd $src |
pankso@12664 | 39 make DESTDIR=$DESTDIR install |
pankso@12664 | 40 } |
pankso@12664 | 41 |
pankso@1 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@1 | 43 genpkg_rules() |
pankso@1 | 44 { |
pankso@131 | 45 mkdir -p \ |
pankso@132 | 46 $fs/bin \ |
pankso@132 | 47 $fs/dev \ |
pankso@132 | 48 $fs/home \ |
pankso@132 | 49 $fs/media/cdrom \ |
pankso@132 | 50 $fs/media/flash \ |
pankso@132 | 51 $fs/media/usbdisk \ |
pankso@132 | 52 $fs/mnt \ |
pankso@132 | 53 $fs/proc \ |
pankso@132 | 54 $fs/root \ |
pascal@12984 | 55 $fs/run \ |
pankso@132 | 56 $fs/sbin \ |
pankso@132 | 57 $fs/sys \ |
pankso@132 | 58 $fs/tmp \ |
pankso@132 | 59 $fs/usr/bin \ |
pankso@132 | 60 $fs/usr/games \ |
pankso@132 | 61 $fs/usr/lib \ |
pankso@132 | 62 $fs/usr/local \ |
pankso@132 | 63 $fs/usr/sbin \ |
pankso@132 | 64 $fs/usr/share/doc \ |
pankso@132 | 65 $fs/var/cache \ |
pankso@132 | 66 $fs/var/games \ |
pankso@132 | 67 $fs/var/lib \ |
pankso@132 | 68 $fs/var/lock \ |
pankso@12664 | 69 $fs/var/log/slitaz \ |
pankso@132 | 70 $fs/var/spool \ |
pankso@801 | 71 $fs/var/tmp |
pankso@801 | 72 |
pankso@12664 | 73 # Copy all installed files and set permissions. |
pankso@12664 | 74 cp -a $install/* $fs |
pankso@801 | 75 |
pankso@1 | 76 chown -R root.root $fs/* |
pankso@1 | 77 chmod 1777 $fs/tmp |
pankso@1 | 78 chmod 640 $fs/etc/shadow |
pankso@1 | 79 chmod 640 $fs/etc/gshadow |
pankso@607 | 80 chmod 0750 $fs/root |
pankso@801 | 81 |
slaxemulator@8726 | 82 # Populate /dev with $fs/sbin/mktazdevs.sh. |
slaxemulator@8726 | 83 $fs/sbin/mktazdevs.sh $fs/dev |
pankso@801 | 84 |
pankso@1 | 85 # Creat /etc/mtab symlink. |
pankso@1 | 86 cd $fs/etc |
pankso@1 | 87 ln -s /proc/mounts mtab |
pankso@12664 | 88 |
pankso@12664 | 89 # Fix httphelper link |
pankso@12664 | 90 cd $fs/usr/lib/slitaz |
pascal@12795 | 91 ln -s httphelper.sh httphelper |
pankso@1 | 92 } |
pankso@1 | 93 |
pankso@1 | 94 # Pre and post install to backup all /etc/settings |
pankso@1 | 95 # |
pankso@1 | 96 pre_install() |
pankso@1 | 97 { |
pankso@1 | 98 local root |
pankso@1 | 99 root=$1 |
pankso@52 | 100 echo "Creating backup of all files in /etc..." |
pankso@52 | 101 cp -a $root/etc $root/tmp/etc.bak 2>/dev/null |
pankso@1 | 102 } |
pankso@1 | 103 |
pankso@1 | 104 post_install() |
pankso@1 | 105 { |
pankso@1 | 106 local root |
pankso@1 | 107 root=$1 |
pankso@52 | 108 echo "Restoring files from /etc/etc.bak..." |
pankso@52 | 109 cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null |
pankso@1 | 110 rm -rf $root/tmp/etc.bak |
pankso@801 | 111 |
pankso@1 | 112 # Reset permission. |
pankso@1 | 113 chmod 640 $root/etc/shadow |
pankso@1 | 114 chmod 640 $root/etc/gshadow |
pankso@801 | 115 |
pankso@1 | 116 if ! grep -q audio $root/etc/group; then |
pascal@5125 | 117 chroot $root/ /bin/addgroup -g 20 audio |
pankso@1 | 118 fi |
pankso@1 | 119 } |
pascal@8932 | 120 |
pascal@8932 | 121 pre_remove() |
pascal@8932 | 122 { |
pascal@8932 | 123 # We can not remove this package ! |
pascal@8932 | 124 exit 1 |
pascal@8932 | 125 } |