wok-stable annotate slitaz-tools/receipt @ rev 7877

Up: yad (0.7.2)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 03 23:29:52 2011 +0100 (2011-01-03)
parents c753c126a746
children 65cf4ba258b7
rev   line source
pankso@11 1 # SliTaz package receipt.
pankso@11 2
pankso@11 3 PACKAGE="slitaz-tools"
pascal@7809 4 VERSION="3.9.3"
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"
pascal@7805 8 DEPENDS="slitaz-boot-scripts dialog gettext-base slitaz-configs-base"
slaxemulator@6925 9 BUILD_DEPENDS="gettext"
pankso@2094 10 SUGGESTED="slitaz-tools-boxes"
gokhlayeh@7003 11 #TARBALL="$PACKAGE-$VERSION.tar.gz"
gokhlayeh@7003 12 TARBALL="$VERSION.tar.gz"
pankso@11 13 WEB_SITE="http://www.slitaz.org/"
gokhlayeh@7003 14 #WGET_URL="http://mirror.slitaz.org/sources/tools/$TARBALL"
gokhlayeh@7003 15 # using an hg URL because tarball is not avaible at this moment
gokhlayeh@7003 16 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$TARBALL"
pascal@1212 17 CONFIG_FILES="
pascal@1212 18 /etc/TZ
pascal@1212 19 /etc/motd
pascal@1212 20 /etc/keymap.conf
pascal@1212 21 /etc/X11/screen.conf
pascal@1212 22 /etc/locale.conf
pankso@2889 23 /etc/firewall.conf
pankso@2889 24 /etc/slitaz/applications.conf"
pankso@11 25
pankso@5126 26 # Rules to configure and make the package.
pankso@5126 27 compile_rules()
pankso@5126 28 {
pankso@5126 29 cd $src
pankso@5126 30 make msgfmt
pankso@5126 31 }
pankso@5126 32
pankso@11 33 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@11 34 #
pankso@5126 35 # This package is moslty build by genpkg, it provide /usr/share/examples tree,
pankso@11 36 # tazlito, tinyutils, licenses, documentation and artwork. This package
pankso@11 37 # provide also the Firewall deamon/config (/etc/firewall.conf).
pankso@11 38 #
pankso@11 39 genpkg_rules()
pankso@11 40 {
pankso@659 41 mkdir -p \
pankso@659 42 $fs/sbin \
pankso@659 43 $fs/usr/bin \
pankso@659 44 $fs/usr/sbin \
pankso@892 45 $fs/etc/X11 \
pankso@659 46 $fs/var/spool/cron/crontabs \
pankso@2889 47 $fs/usr/share/slitaz/messages/en
pankso@892 48 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
pankso@11 49 cp -a $src/rootfs/* $fs
jozee@5302 50 chmod +x $fs/etc/init.d/*
pankso@2893 51 rm -rf $fs/usr/share/applications
pankso@2893 52 rm -rf $fs/usr/share/pixmaps
pankso@2889 53 # Tinyutils and declare all config files.
pankso@11 54 cp -a $src/tinyutils/tazlocale $fs/sbin
pascal@847 55 touch $fs/etc/locale.conf
pascal@847 56 touch $fs/etc/motd
pankso@716 57 cp -a $src/tinyutils/tazkeymap $fs/sbin
pascal@847 58 touch $fs/etc/keymap.conf
pascal@847 59 touch $fs/etc/TZ
pankso@11 60 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
pankso@11 61 cp -a $src/tinyutils/tazx $fs/usr/bin
pascal@847 62 touch $fs/etc/X11/screen.conf
pankso@2292 63 cp -a $src/tinyutils/tazhw $fs/sbin
jozee@5129 64 cp -a $src/tinyutils/hwsetup $fs/sbin
pankso@2889 65 for app in startx history tazdialog editor browser terminal file-manager
pankso@2889 66 do
pankso@2889 67 cp -a $src/tinyutils/$app $fs/usr/bin
pankso@2889 68 done
pankso@766 69 # Sound config
pankso@766 70 cp -a $src/tinyutils/soundconf $fs/usr/sbin
pankso@761 71 cp -a $src/tinyutils/setmixer $fs/usr/sbin
pankso@266 72 # Installer's
pankso@266 73 cp -a $src/installer/slitaz-installer $fs/usr/bin
pankso@3083 74 cp -a $src/messages/en/installer.msg $fs/usr/share/slitaz/messages/en
pankso@401 75 chown -R root.root $fs
pankso@401 76 chmod -R 755 $fs/usr/bin
pankso@401 77 chmod -R 755 $fs/sbin
pankso@11 78 }
pascal@1062 79
pankso@1098 80 # Pre install commands.
pankso@1098 81 pre_install()
pankso@1098 82 {
pankso@1098 83 local root
pankso@1098 84 root=$1
pankso@1098 85 # Backup file to restore with post install
pankso@1098 86 echo "Creating backups of configs..."
pankso@1098 87 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
pankso@1098 88 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
pankso@1098 89 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
pankso@1098 90 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
pankso@1098 91 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
pankso@1098 92 }
pankso@1098 93
pankso@1098 94 # Post install
pascal@1062 95 post_install()
pascal@1062 96 {
pankso@1098 97 echo "Restoring configs backups..."
pankso@1098 98 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
pankso@1098 99 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
pankso@1098 100 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
pankso@1098 101 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
pankso@1098 102 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
pankso@2094 103 # Install boxes package if old slitaz-tools
pankso@2094 104 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
pascal@2101 105 tazpkg get-install slitaz-tools-boxes
pankso@2094 106 fi
pankso@2889 107 # Remove old files
pankso@2889 108 rm -rf $root/usr/share/slitaz-tools
pankso@2893 109 rm -rf $root/usr/share/doc/slitaz-tools
pascal@1062 110 }