wok annotate slitaz-tools/receipt @ rev 2902
ario, libmtp-dev, libnjb-dev, libusb-compat: update depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 06 10:19:09 2009 +0200 (2009-05-06) |
parents | f49b74c50582 |
children | 30e968a1ed73 |
rev | line source |
---|---|
pankso@11 | 1 # SliTaz package receipt. |
pankso@11 | 2 |
pankso@11 | 3 PACKAGE="slitaz-tools" |
pankso@2893 | 4 VERSION="3.1" |
pankso@194 | 5 CATEGORY="system-tools" |
pankso@2094 | 6 SHORT_DESC="SliTaz tools provide installer and utils usable on termnial." |
pankso@11 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@2094 | 8 DEPENDS="slitaz-boot-scripts dialog" |
pankso@2094 | 9 SUGGESTED="slitaz-tools-boxes" |
pankso@11 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@11 | 11 WEB_SITE="http://www.slitaz.org/" |
pascal@1940 | 12 WGET_URL="http://mirror.slitaz.org/sources/tools/$TARBALL" |
pascal@1212 | 13 CONFIG_FILES=" |
pascal@1212 | 14 /etc/TZ |
pascal@1212 | 15 /etc/motd |
pascal@1212 | 16 /etc/keymap.conf |
pascal@1212 | 17 /etc/X11/screen.conf |
pascal@1212 | 18 /etc/locale.conf |
pankso@2889 | 19 /etc/firewall.conf |
pankso@2889 | 20 /etc/slitaz/applications.conf" |
pankso@11 | 21 |
pankso@11 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@11 | 23 # |
pankso@11 | 24 # This package is all build by genpkg, it provide /usr/share/examples tree, |
pankso@11 | 25 # tazlito, tinyutils, licenses, documentation and artwork. This package |
pankso@11 | 26 # provide also the Firewall deamon/config (/etc/firewall.conf). |
pankso@11 | 27 # |
pankso@11 | 28 genpkg_rules() |
pankso@11 | 29 { |
pankso@659 | 30 mkdir -p \ |
pankso@659 | 31 $fs/sbin \ |
pankso@659 | 32 $fs/usr/bin \ |
pankso@659 | 33 $fs/usr/sbin \ |
pankso@892 | 34 $fs/etc/X11 \ |
pankso@659 | 35 $fs/var/spool/cron/crontabs \ |
pankso@2889 | 36 $fs/usr/share/slitaz/messages/en |
pankso@775 | 37 |
pankso@892 | 38 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files. |
pankso@11 | 39 cp -a $src/rootfs/* $fs |
pankso@2893 | 40 rm -rf $fs/usr/share/applications |
pankso@2893 | 41 rm -rf $fs/usr/share/pixmaps |
pankso@11 | 42 |
pankso@2889 | 43 # Tinyutils and declare all config files. |
pankso@11 | 44 cp -a $src/tinyutils/tazlocale $fs/sbin |
pascal@847 | 45 touch $fs/etc/locale.conf |
pascal@847 | 46 touch $fs/etc/motd |
pankso@716 | 47 cp -a $src/tinyutils/tazkeymap $fs/sbin |
pascal@847 | 48 touch $fs/etc/keymap.conf |
pascal@847 | 49 touch $fs/etc/TZ |
pankso@11 | 50 cp -a $src/tinyutils/gztazmod.sh $fs/sbin |
pankso@11 | 51 cp -a $src/tinyutils/tazx $fs/usr/bin |
pascal@847 | 52 touch $fs/etc/X11/screen.conf |
pankso@2292 | 53 cp -a $src/tinyutils/tazhw $fs/sbin |
pankso@2889 | 54 for app in startx history tazdialog editor browser terminal file-manager |
pankso@2889 | 55 do |
pankso@2889 | 56 cp -a $src/tinyutils/$app $fs/usr/bin |
pankso@2889 | 57 done |
pankso@766 | 58 # Sound config |
pankso@766 | 59 cp -a $src/tinyutils/soundconf $fs/usr/sbin |
pankso@761 | 60 cp -a $src/tinyutils/setmixer $fs/usr/sbin |
pankso@775 | 61 |
pankso@266 | 62 # Installer's |
pankso@266 | 63 cp -a $src/installer/slitaz-installer $fs/usr/bin |
pankso@2889 | 64 cp -a $src/installer/installer.msg $fs/usr/share/slitaz/messages/en |
pankso@2893 | 65 |
pankso@2893 | 66 # English messages |
pankso@2893 | 67 cp -a $src/messages/* $fs/usr/share/slitaz/messages/en |
pankso@775 | 68 |
pankso@401 | 69 chown -R root.root $fs |
pankso@401 | 70 chmod -R 755 $fs/usr/bin |
pankso@401 | 71 chmod -R 755 $fs/sbin |
pankso@11 | 72 } |
pascal@1062 | 73 |
pankso@1098 | 74 # Pre install commands. |
pankso@1098 | 75 pre_install() |
pankso@1098 | 76 { |
pankso@1098 | 77 local root |
pankso@1098 | 78 root=$1 |
pankso@1098 | 79 # Backup file to restore with post install |
pankso@1098 | 80 echo "Creating backups of configs..." |
pankso@1098 | 81 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null |
pankso@1098 | 82 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null |
pankso@1098 | 83 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null |
pankso@1098 | 84 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null |
pankso@1098 | 85 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null |
pankso@1098 | 86 } |
pankso@1098 | 87 |
pankso@1098 | 88 # Post install |
pascal@1062 | 89 post_install() |
pascal@1062 | 90 { |
pankso@1098 | 91 echo "Restoring configs backups..." |
pankso@1098 | 92 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null |
pankso@1098 | 93 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null |
pankso@1098 | 94 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null |
pankso@1098 | 95 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null |
pankso@1098 | 96 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null |
pankso@2094 | 97 # Install boxes package if old slitaz-tools |
pankso@2094 | 98 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then |
pascal@2101 | 99 tazpkg get-install slitaz-tools-boxes |
pankso@2094 | 100 fi |
pankso@2889 | 101 # Remove old files |
pankso@2889 | 102 rm -rf $root/usr/share/slitaz-tools |
pankso@2893 | 103 rm -rf $root/usr/share/doc/slitaz-tools |
pascal@1062 | 104 } |