wok-current view slitaz-tools/receipt @ rev 12091
nanochess: red based colors
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 10 18:05:44 2012 +0100 (2012-03-10) |
parents | 13bce1ba67a4 |
children | 8416b0a1f096 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="4.7.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 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/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 && make DESTDIR=$DESTDIR install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs
33 cp -a $install/* $fs
34 chmod 0644 $fs/usr/share/locale/*/*/*.mo
35 chown -R root.root $fs
36 }
38 # Pre install commands.
39 pre_install()
40 {
41 local root
42 root=$1
43 # Backup file to restore with post install
44 echo "Creating backups of configs..."
45 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
46 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
47 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
48 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
49 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
50 }
52 # Post install
53 post_install()
54 {
55 echo "Restoring configs backups..."
56 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
57 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
58 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
59 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
60 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
61 # Install boxes package if old slitaz-tools
62 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
63 tazpkg get-install slitaz-tools-boxes
64 fi
65 }