wok view slitaz-tools/receipt @ rev 5195

slitaz-doc: fix version for 3.0
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 28 17:16:33 2010 +0200 (2010-03-28)
parents cd0031eb1156
children 85729048b1b9
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="3.8"
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 configure and make the package.
23 compile_rules()
24 {
25 cd $src
26 make msgfmt
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 #
31 # This package is moslty build by genpkg, it provide /usr/share/examples tree,
32 # tazlito, tinyutils, licenses, documentation and artwork. This package
33 # provide also the Firewall deamon/config (/etc/firewall.conf).
34 #
35 genpkg_rules()
36 {
37 mkdir -p \
38 $fs/sbin \
39 $fs/usr/bin \
40 $fs/usr/sbin \
41 $fs/etc/X11 \
42 $fs/var/spool/cron/crontabs \
43 $fs/usr/share/slitaz/messages/en
44 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
45 cp -a $src/rootfs/* $fs
46 rm -rf $fs/usr/share/applications
47 rm -rf $fs/usr/share/pixmaps
48 # Tinyutils and declare all config files.
49 cp -a $src/tinyutils/tazlocale $fs/sbin
50 touch $fs/etc/locale.conf
51 touch $fs/etc/motd
52 cp -a $src/tinyutils/tazkeymap $fs/sbin
53 touch $fs/etc/keymap.conf
54 touch $fs/etc/TZ
55 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
56 cp -a $src/tinyutils/tazx $fs/usr/bin
57 touch $fs/etc/X11/screen.conf
58 cp -a $src/tinyutils/tazhw $fs/sbin
59 cp -a $src/tinyutils/hwsetup $fs/sbin
60 for app in startx history tazdialog editor browser terminal file-manager
61 do
62 cp -a $src/tinyutils/$app $fs/usr/bin
63 done
64 # Sound config
65 cp -a $src/tinyutils/soundconf $fs/usr/sbin
66 cp -a $src/tinyutils/setmixer $fs/usr/sbin
67 # Installer's
68 cp -a $src/installer/slitaz-installer $fs/usr/bin
69 cp -a $src/messages/en/installer.msg $fs/usr/share/slitaz/messages/en
70 chown -R root.root $fs
71 chmod -R 755 $fs/usr/bin
72 chmod -R 755 $fs/sbin
73 }
75 # Pre install commands.
76 pre_install()
77 {
78 local root
79 root=$1
80 # Backup file to restore with post install
81 echo "Creating backups of configs..."
82 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
83 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
84 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
85 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
86 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
87 }
89 # Post install
90 post_install()
91 {
92 echo "Restoring configs backups..."
93 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
94 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
95 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
96 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
97 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
98 # Install boxes package if old slitaz-tools
99 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
100 tazpkg get-install slitaz-tools-boxes
101 fi
102 # Remove old files
103 rm -rf $root/usr/share/slitaz-tools
104 rm -rf $root/usr/share/doc/slitaz-tools
105 }