wok annotate slitaz-tools/receipt @ rev 1937

Up slitaz-tools (2.8)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Dec 26 20:18:26 2008 +0000 (2008-12-26)
parents bd6010223726
children ef142acb45e8
rev   line source
pankso@11 1 # SliTaz package receipt.
pankso@11 2
pankso@11 3 PACKAGE="slitaz-tools"
pascal@1937 4 VERSION="2.8"
pankso@194 5 CATEGORY="system-tools"
pankso@79 6 SHORT_DESC="SliTaz tools provide installer and Tinyutils."
pankso@11 7 MAINTAINER="pankso@slitaz.org"
pascal@1571 8 DEPENDS="slitaz-boot-scripts dialog gtkdialog"
pankso@11 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@11 10 WEB_SITE="http://www.slitaz.org/"
pankso@11 11 WGET_URL="http://download.tuxfamily.org/slitaz/sources/tools/$TARBALL"
pascal@1212 12 CONFIG_FILES="
pascal@1212 13 /etc/TZ
pascal@1212 14 /etc/motd
pascal@1212 15 /etc/keymap.conf
pascal@1212 16 /etc/X11/screen.conf
pascal@1212 17 /etc/locale.conf
pascal@1212 18 /etc/firewall.conf"
pankso@11 19
pankso@11 20 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@11 21 #
pankso@11 22 # This package is all build by genpkg, it provide /usr/share/examples tree,
pankso@11 23 # tazlito, tinyutils, licenses, documentation and artwork. This package
pankso@11 24 # provide also the Firewall deamon/config (/etc/firewall.conf).
pankso@11 25 #
pankso@11 26 genpkg_rules()
pankso@11 27 {
pankso@659 28 mkdir -p \
pankso@659 29 $fs/sbin \
pankso@659 30 $fs/usr/bin \
pankso@659 31 $fs/usr/sbin \
pankso@892 32 $fs/etc/X11 \
pankso@659 33 $fs/var/spool/cron/crontabs \
pankso@766 34 $fs/usr/lib/slitaz \
pankso@776 35 $fs/usr/share/doc/slitaz-tools \
pankso@776 36 $fs/usr/share/slitaz-tools/glade \
pankso@659 37 $fs/usr/share/slitaz-tools/installer
pankso@775 38
pankso@892 39 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
pankso@11 40 cp -a $src/rootfs/* $fs
pankso@11 41
pankso@11 42 # Tinyutils.
pankso@11 43 cp -a $src/tinyutils/tazlocale $fs/sbin
pascal@847 44 touch $fs/etc/locale.conf
pascal@847 45 touch $fs/etc/motd
pankso@716 46 cp -a $src/tinyutils/tazkeymap $fs/sbin
pascal@847 47 touch $fs/etc/keymap.conf
pascal@847 48 touch $fs/etc/TZ
pankso@11 49 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
pankso@11 50 cp -a $src/tinyutils/tazx $fs/usr/bin
pascal@847 51 touch $fs/etc/X11/screen.conf
pankso@11 52 cp -a $src/tinyutils/startx $fs/usr/bin
pankso@354 53 cp -a $src/tinyutils/history $fs/usr/bin
pankso@805 54 cp -a $src/tinyutils/tazdialog $fs/usr/bin
pankso@766 55 # Sound config
pankso@766 56 cp -a $src/tinyutils/soundconf $fs/usr/sbin
pankso@761 57 cp -a $src/tinyutils/setmixer $fs/usr/sbin
pankso@1754 58
pankso@138 59 # Gtkdialog boxes
pankso@659 60 cp -a $src/tinyutils/bootfloppybox $fs/usr/bin
pankso@138 61 cp -a $src/tinyutils/burnbox $fs/usr/bin
pankso@11 62 cp -a $src/tinyutils/mountbox $fs/usr/bin
pankso@138 63 cp -a $src/tinyutils/netbox $fs/usr/bin
pankso@138 64 cp -a $src/tinyutils/scpbox $fs/usr/bin
pankso@138 65 cp -a $src/tinyutils/subox $fs/usr/bin
pankso@761 66 cp -a $src/tinyutils/desktopbox $fs/usr/bin
pankso@1754 67 cp -a $src/tinyutils/tazctrlbox $fs/usr/sbin
pankso@805 68
pankso@892 69 # Libs and Glade XML files.
pankso@766 70 cp -a $src/lib/[a-z]* $fs/usr/lib/slitaz
pankso@805 71 cp -a $src/glade/*.glade $fs/usr/share/slitaz-tools/glade
pankso@775 72
pankso@266 73 # Installer's
pankso@266 74 cp -a $src/installer/slitaz-installer $fs/usr/bin
pankso@659 75 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
pankso@775 76
pankso@11 77 # Tools doc in /usr/share/doc/slitaz-tools
pankso@892 78 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
pankso@775 79
pankso@425 80 # Gksu fake for pcmanfm
pankso@425 81 cd $fs/usr/bin
pankso@425 82 ln -s subox gksu
pankso@426 83 cd $WOK/$PACKAGE
pankso@775 84
pankso@401 85 chown -R root.root $fs
pankso@401 86 chmod -R 755 $fs/usr/bin
pankso@401 87 chmod -R 755 $fs/sbin
pankso@11 88 }
pascal@1062 89
pankso@1098 90 # Pre install commands.
pankso@1098 91 pre_install()
pankso@1098 92 {
pankso@1098 93 local root
pankso@1098 94 root=$1
pankso@1098 95 # Backup file to restore with post install
pankso@1098 96 echo "Creating backups of configs..."
pankso@1098 97 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
pankso@1098 98 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
pankso@1098 99 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
pankso@1098 100 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
pankso@1098 101 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
pankso@1098 102 }
pankso@1098 103
pankso@1098 104 # Post install
pascal@1062 105 post_install()
pascal@1062 106 {
pankso@1098 107 echo "Restoring configs backups..."
pankso@1098 108 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
pankso@1098 109 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
pankso@1098 110 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
pankso@1098 111 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
pankso@1098 112 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
pascal@1062 113 }