wok-6.x view slitaz-tools/receipt @ rev 2166
Add linux-usbdsl
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 07 11:37:22 2009 +0000 (2009-02-07) |
parents | 140f816711dc |
children | 776e2d3f8c05 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="2.8.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"
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"
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 #
23 # This package is all build by genpkg, it provide /usr/share/examples tree,
24 # tazlito, tinyutils, licenses, documentation and artwork. This package
25 # provide also the Firewall deamon/config (/etc/firewall.conf).
26 #
27 genpkg_rules()
28 {
29 mkdir -p \
30 $fs/sbin \
31 $fs/usr/bin \
32 $fs/usr/sbin \
33 $fs/etc/X11 \
34 $fs/var/spool/cron/crontabs \
35 $fs/usr/share/doc/slitaz-tools \
36 $fs/usr/share/slitaz-tools/installer
38 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
39 cp -a $src/rootfs/* $fs
41 # Tinyutils.
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/startx $fs/usr/bin
52 cp -a $src/tinyutils/history $fs/usr/bin
53 cp -a $src/tinyutils/tazdialog $fs/usr/bin
54 # Sound config
55 cp -a $src/tinyutils/soundconf $fs/usr/sbin
56 cp -a $src/tinyutils/setmixer $fs/usr/sbin
58 # Installer's
59 cp -a $src/installer/slitaz-installer $fs/usr/bin
60 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
62 # Tools doc in /usr/share/doc/slitaz-tools
63 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
65 chown -R root.root $fs
66 chmod -R 755 $fs/usr/bin
67 chmod -R 755 $fs/sbin
68 }
70 # Pre install commands.
71 pre_install()
72 {
73 local root
74 root=$1
75 # Backup file to restore with post install
76 echo "Creating backups of configs..."
77 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
78 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
79 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
80 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
81 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
82 }
84 # Post install
85 post_install()
86 {
87 echo "Restoring configs backups..."
88 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
89 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
90 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
91 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
92 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
93 # Install boxes package if old slitaz-tools
94 if [ -f $root/usr/bin/mountbox ] && [ ! -d /var/lib/tazpkg/installed/slitaz-tools-boxes ]; then
95 tazpkg get-install slitaz-tools-boxes
96 fi
97 }