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