wok view slitaz-tools/receipt @ rev 3333
Depends: ORBit2
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Wed Jun 10 10:58:34 2009 +0000 (2009-06-10) |
parents | 30e968a1ed73 |
children | cf9a12d52d33 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="3.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"
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
37 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
38 cp -a $src/rootfs/* $fs
39 rm -rf $fs/usr/share/applications
40 rm -rf $fs/usr/share/pixmaps
41 # Tinyutils and declare all config files.
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/tazhw $fs/sbin
52 for app in startx history tazdialog editor browser terminal file-manager
53 do
54 cp -a $src/tinyutils/$app $fs/usr/bin
55 done
56 # Sound config
57 cp -a $src/tinyutils/soundconf $fs/usr/sbin
58 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/messages/en/installer.msg $fs/usr/share/slitaz/messages/en
62 chown -R root.root $fs
63 chmod -R 755 $fs/usr/bin
64 chmod -R 755 $fs/sbin
65 }
67 # Pre install commands.
68 pre_install()
69 {
70 local root
71 root=$1
72 # Backup file to restore with post install
73 echo "Creating backups of configs..."
74 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
75 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
76 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
77 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
78 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
79 }
81 # Post install
82 post_install()
83 {
84 echo "Restoring configs backups..."
85 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
86 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
87 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
88 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
89 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
90 # Install boxes package if old slitaz-tools
91 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
92 tazpkg get-install slitaz-tools-boxes
93 fi
94 # Remove old files
95 rm -rf $root/usr/share/slitaz-tools
96 rm -rf $root/usr/share/doc/slitaz-tools
97 }