wok view slitaz-tools/receipt @ rev 5414

Up: gtkpod (0.9.16) - Added intltool to build depends.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon May 03 16:57:26 2010 +0000 (2010-05-03)
parents 057392e65d9a
children cfc7635b6241
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 chmod +x $fs/etc/init.d/*
47 rm -rf $fs/usr/share/applications
48 rm -rf $fs/usr/share/pixmaps
49 # Tinyutils and declare all config files.
50 cp -a $src/tinyutils/tazlocale $fs/sbin
51 touch $fs/etc/locale.conf
52 touch $fs/etc/motd
53 cp -a $src/tinyutils/tazkeymap $fs/sbin
54 touch $fs/etc/keymap.conf
55 touch $fs/etc/TZ
56 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
57 cp -a $src/tinyutils/tazx $fs/usr/bin
58 touch $fs/etc/X11/screen.conf
59 cp -a $src/tinyutils/tazhw $fs/sbin
60 cp -a $src/tinyutils/hwsetup $fs/sbin
61 for app in startx history tazdialog editor browser terminal file-manager
62 do
63 cp -a $src/tinyutils/$app $fs/usr/bin
64 done
65 # Sound config
66 cp -a $src/tinyutils/soundconf $fs/usr/sbin
67 cp -a $src/tinyutils/setmixer $fs/usr/sbin
68 # Installer's
69 cp -a $src/installer/slitaz-installer $fs/usr/bin
70 cp -a $src/messages/en/installer.msg $fs/usr/share/slitaz/messages/en
71 chown -R root.root $fs
72 chmod -R 755 $fs/usr/bin
73 chmod -R 755 $fs/sbin
74 }
76 # Pre install commands.
77 pre_install()
78 {
79 local root
80 root=$1
81 # Backup file to restore with post install
82 echo "Creating backups of configs..."
83 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
84 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
85 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
86 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
87 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
88 }
90 # Post install
91 post_install()
92 {
93 echo "Restoring configs backups..."
94 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
95 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
96 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
97 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
98 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
99 # Install boxes package if old slitaz-tools
100 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
101 tazpkg get-install slitaz-tools-boxes
102 fi
103 # Remove old files
104 rm -rf $root/usr/share/slitaz-tools
105 rm -rf $root/usr/share/doc/slitaz-tools
106 }