wok-6.x view slitaz-tools/receipt @ rev 3023

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