wok view slitaz-tools/receipt @ rev 7679

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