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