wok-next view slitaz-tools/receipt @ rev 12691
Up: slitaz-tools (5.0)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 02 16:12:14 2012 +0200 (2012-05-02) |
parents | 76dabc3432a1 |
children | 9ba57c7ee2b2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="5.0"
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/locale.conf
18 /etc/firewall.conf
19 /etc/slitaz/applications.conf"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 cd $src
25 # temp tazinst patch (until next release)
26 # Must stay in stable since tools <5.0 are not compaible 4.0.
27 #patch -p1 < $stuff/tazinst.patch || return 1
28 make && make DESTDIR=$DESTDIR install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs
35 cp -a $install/* $fs
37 # Makefile bug in 5.0
38 cp -a $src/tinyutils/decode $fs/usr/bin
40 chmod 0644 $fs/usr/share/locale/*/*/*.mo
41 chown -R root.root $fs
42 }
44 # Pre install commands.
45 pre_install()
46 {
47 local root
48 root=$1
49 # Backup file to restore with post install
50 echo "Creating backups of configs..."
51 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
52 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
53 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
54 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
55 }
57 # Post install
58 post_install()
59 {
60 echo "Restoring configs backups..."
61 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
62 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
63 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
64 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
65 }