wok-4.x view slitaz-tools/receipt @ rev 1561

get-texlive: inform user that it will install 31Mo
author Pierre-Jean Fichet <sygne@ombres.eu>
date Mon Oct 13 14:50:22 2008 +0200 (2008-10-13)
parents 5edeea43421a
children 9094d2f4919c
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="2.6"
5 CATEGORY="system-tools"
6 SHORT_DESC="SliTaz tools provide installer and Tinyutils."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="slitaz-boot-scripts dialog"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.slitaz.org/"
11 WGET_URL="http://download.tuxfamily.org/slitaz/sources/tools/$TARBALL"
12 CONFIG_FILES="
13 /etc/TZ
14 /etc/motd
15 /etc/keymap.conf
16 /etc/X11/screen.conf
17 /etc/locale.conf
18 /etc/firewall.conf"
20 # Rules to gen a SliTaz package suitable for Tazpkg.
21 #
22 # This package is all build by genpkg, it provide /usr/share/examples tree,
23 # tazlito, tinyutils, licenses, documentation and artwork. This package
24 # provide also the Firewall deamon/config (/etc/firewall.conf).
25 #
26 genpkg_rules()
27 {
28 mkdir -p \
29 $fs/sbin \
30 $fs/usr/bin \
31 $fs/usr/sbin \
32 $fs/etc/X11 \
33 $fs/var/spool/cron/crontabs \
34 $fs/usr/lib/slitaz \
35 $fs/usr/share/doc/slitaz-tools \
36 $fs/usr/share/slitaz-tools/glade \
37 $fs/usr/share/slitaz-tools/installer
39 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
40 cp -a $src/rootfs/* $fs
42 # Tinyutils.
43 cp -a $src/tinyutils/tazlocale $fs/sbin
44 touch $fs/etc/locale.conf
45 touch $fs/etc/motd
46 cp -a $src/tinyutils/tazkeymap $fs/sbin
47 touch $fs/etc/keymap.conf
48 touch $fs/etc/TZ
49 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
50 cp -a $src/tinyutils/tazx $fs/usr/bin
51 touch $fs/etc/X11/screen.conf
52 cp -a $src/tinyutils/startx $fs/usr/bin
53 cp -a $src/tinyutils/history $fs/usr/bin
54 cp -a $src/tinyutils/tazdialog $fs/usr/bin
55 # Sound config
56 cp -a $src/tinyutils/soundconf $fs/usr/sbin
57 cp -a $src/tinyutils/setmixer $fs/usr/sbin
59 # Gtkdialog boxes
60 cp -a $src/tinyutils/bootfloppybox $fs/usr/bin
61 cp -a $src/tinyutils/burnbox $fs/usr/bin
62 cp -a $src/tinyutils/mountbox $fs/usr/bin
63 cp -a $src/tinyutils/netbox $fs/usr/bin
64 cp -a $src/tinyutils/scpbox $fs/usr/bin
65 cp -a $src/tinyutils/subox $fs/usr/bin
66 cp -a $src/tinyutils/torrentbox $fs/usr/bin
67 cp -a $src/tinyutils/desktopbox $fs/usr/bin
69 # Libs and Glade XML files.
70 cp -a $src/lib/[a-z]* $fs/usr/lib/slitaz
71 cp -a $src/glade/*.glade $fs/usr/share/slitaz-tools/glade
73 # Installer's
74 cp -a $src/installer/slitaz-installer $fs/usr/bin
75 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
77 # Tools doc in /usr/share/doc/slitaz-tools
78 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
80 # Gksu fake for pcmanfm
81 cd $fs/usr/bin
82 ln -s subox gksu
83 cd $WOK/$PACKAGE
85 chown -R root.root $fs
86 chmod -R 755 $fs/usr/bin
87 chmod -R 755 $fs/sbin
88 }
90 # Pre install commands.
91 pre_install()
92 {
93 local root
94 root=$1
95 # Backup file to restore with post install
96 echo "Creating backups of configs..."
97 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
98 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
99 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
100 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
101 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
102 }
104 # Post install
105 post_install()
106 {
107 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
108 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
109 etc/TZ
110 etc/motd
111 etc/keymap.conf
112 etc/X11/screen.conf
113 etc/locale.conf
114 etc/firewall.conf
115 EOT
116 echo "Restoring configs backups..."
117 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
118 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
119 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
120 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
121 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
122 }
124 repack_cleanup()
125 {
126 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
127 }