wok-4.x annotate slitaz-tools/receipt @ rev 2094
slitaz-tools*: split GTK boxes+ accord DEPENDS so we can use tools in base flavor
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jan 28 18:59:11 2009 +0100 (2009-01-28) |
parents | b082b30a05bd |
children | 1d608720cb52 |
rev | line source |
---|---|
pankso@11 | 1 # SliTaz package receipt. |
pankso@11 | 2 |
pankso@11 | 3 PACKAGE="slitaz-tools" |
pankso@1957 | 4 VERSION="2.8.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 |
pascal@1212 | 19 /etc/firewall.conf" |
pankso@11 | 20 |
pankso@11 | 21 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@11 | 22 # |
pankso@11 | 23 # This package is all build by genpkg, it provide /usr/share/examples tree, |
pankso@11 | 24 # tazlito, tinyutils, licenses, documentation and artwork. This package |
pankso@11 | 25 # provide also the Firewall deamon/config (/etc/firewall.conf). |
pankso@11 | 26 # |
pankso@11 | 27 genpkg_rules() |
pankso@11 | 28 { |
pankso@659 | 29 mkdir -p \ |
pankso@659 | 30 $fs/sbin \ |
pankso@659 | 31 $fs/usr/bin \ |
pankso@659 | 32 $fs/usr/sbin \ |
pankso@892 | 33 $fs/etc/X11 \ |
pankso@659 | 34 $fs/var/spool/cron/crontabs \ |
pankso@776 | 35 $fs/usr/share/doc/slitaz-tools \ |
pankso@659 | 36 $fs/usr/share/slitaz-tools/installer |
pankso@775 | 37 |
pankso@892 | 38 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files. |
pankso@11 | 39 cp -a $src/rootfs/* $fs |
pankso@11 | 40 |
pankso@11 | 41 # Tinyutils. |
pankso@11 | 42 cp -a $src/tinyutils/tazlocale $fs/sbin |
pascal@847 | 43 touch $fs/etc/locale.conf |
pascal@847 | 44 touch $fs/etc/motd |
pankso@716 | 45 cp -a $src/tinyutils/tazkeymap $fs/sbin |
pascal@847 | 46 touch $fs/etc/keymap.conf |
pascal@847 | 47 touch $fs/etc/TZ |
pankso@11 | 48 cp -a $src/tinyutils/gztazmod.sh $fs/sbin |
pankso@11 | 49 cp -a $src/tinyutils/tazx $fs/usr/bin |
pascal@847 | 50 touch $fs/etc/X11/screen.conf |
pankso@11 | 51 cp -a $src/tinyutils/startx $fs/usr/bin |
pankso@354 | 52 cp -a $src/tinyutils/history $fs/usr/bin |
pankso@805 | 53 cp -a $src/tinyutils/tazdialog $fs/usr/bin |
pankso@766 | 54 # Sound config |
pankso@766 | 55 cp -a $src/tinyutils/soundconf $fs/usr/sbin |
pankso@761 | 56 cp -a $src/tinyutils/setmixer $fs/usr/sbin |
pankso@775 | 57 |
pankso@266 | 58 # Installer's |
pankso@266 | 59 cp -a $src/installer/slitaz-installer $fs/usr/bin |
pankso@659 | 60 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer |
pankso@775 | 61 |
pankso@11 | 62 # Tools doc in /usr/share/doc/slitaz-tools |
pankso@892 | 63 cp $src/doc/* $fs/usr/share/doc/slitaz-tools |
pankso@775 | 64 |
pankso@401 | 65 chown -R root.root $fs |
pankso@401 | 66 chmod -R 755 $fs/usr/bin |
pankso@401 | 67 chmod -R 755 $fs/sbin |
pankso@11 | 68 } |
pascal@1062 | 69 |
pankso@1098 | 70 # Pre install commands. |
pankso@1098 | 71 pre_install() |
pankso@1098 | 72 { |
pankso@1098 | 73 local root |
pankso@1098 | 74 root=$1 |
pankso@1098 | 75 # Backup file to restore with post install |
pankso@1098 | 76 echo "Creating backups of configs..." |
pankso@1098 | 77 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null |
pankso@1098 | 78 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null |
pankso@1098 | 79 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null |
pankso@1098 | 80 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null |
pankso@1098 | 81 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null |
pankso@1098 | 82 } |
pankso@1098 | 83 |
pankso@1098 | 84 # Post install |
pascal@1062 | 85 post_install() |
pascal@1062 | 86 { |
pankso@1098 | 87 echo "Restoring configs backups..." |
pankso@1098 | 88 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null |
pankso@1098 | 89 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null |
pankso@1098 | 90 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null |
pankso@1098 | 91 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null |
pankso@1098 | 92 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null |
pankso@2094 | 93 # Install boxes package if old slitaz-tools |
pankso@2094 | 94 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then |
pankso@2094 | 95 tazpkg get-install slitaz- |
pankso@2094 | 96 fi |
pascal@1062 | 97 } |