wok-current view slitaz-tools/receipt @ rev 2810

libQtSql update to 4.5.0
author Allan Pinto <allan316@gmail.com>
date Wed Apr 29 10:18:34 2009 +0000 (2009-04-29)
parents 0255380dc239
children f49b74c50582
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="2.12.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"
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 #
23 # This package is all build by genpkg, it provide /usr/share/examples tree,
24 # tazlito, tinyutils, licenses, documentation and artwork. This package
25 # provide also the Firewall deamon/config (/etc/firewall.conf).
26 #
27 genpkg_rules()
28 {
29 mkdir -p \
30 $fs/sbin \
31 $fs/usr/bin \
32 $fs/usr/sbin \
33 $fs/etc/X11 \
34 $fs/var/spool/cron/crontabs \
35 $fs/usr/share/doc/slitaz-tools \
36 $fs/usr/share/slitaz-tools/installer
38 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
39 cp -a $src/rootfs/* $fs
41 # Tinyutils.
42 cp -a $src/tinyutils/tazlocale $fs/sbin
43 touch $fs/etc/locale.conf
44 touch $fs/etc/motd
45 cp -a $src/tinyutils/tazkeymap $fs/sbin
46 touch $fs/etc/keymap.conf
47 touch $fs/etc/TZ
48 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
49 cp -a $src/tinyutils/tazx $fs/usr/bin
50 touch $fs/etc/X11/screen.conf
51 cp -a $src/tinyutils/startx $fs/usr/bin
52 cp -a $src/tinyutils/history $fs/usr/bin
53 cp -a $src/tinyutils/tazdialog $fs/usr/bin
54 cp -a $src/tinyutils/tazhw $fs/sbin
55 # Sound config
56 cp -a $src/tinyutils/soundconf $fs/usr/sbin
57 cp -a $src/tinyutils/setmixer $fs/usr/sbin
59 # Installer's
60 cp -a $src/installer/slitaz-installer $fs/usr/bin
61 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
63 # Tools doc in /usr/share/doc/slitaz-tools
64 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
66 chown -R root.root $fs
67 chmod -R 755 $fs/usr/bin
68 chmod -R 755 $fs/sbin
69 }
71 # Pre install commands.
72 pre_install()
73 {
74 local root
75 root=$1
76 # Backup file to restore with post install
77 echo "Creating backups of configs..."
78 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
79 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
80 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
81 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
82 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
83 }
85 # Post install
86 post_install()
87 {
88 echo "Restoring configs backups..."
89 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
90 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
91 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
92 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
93 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
94 # Install boxes package if old slitaz-tools
95 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
96 tazpkg get-install slitaz-tools-boxes
97 fi
98 }