wok-current view slitaz-tools/receipt @ rev 1891

slitaz-loram*: aufs wierdness
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 18 15:09:25 2008 +0000 (2008-12-18)
parents 9094d2f4919c
children bd6010223726
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools"
4 VERSION="2.7"
5 CATEGORY="system-tools"
6 SHORT_DESC="SliTaz tools provide installer and Tinyutils."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="slitaz-boot-scripts dialog gtkdialog"
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
68 cp -a $src/tinyutils/tazctrlbox $fs/usr/sbin
70 # Libs and Glade XML files.
71 cp -a $src/lib/[a-z]* $fs/usr/lib/slitaz
72 cp -a $src/glade/*.glade $fs/usr/share/slitaz-tools/glade
74 # Installer's
75 cp -a $src/installer/slitaz-installer $fs/usr/bin
76 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
78 # Tools doc in /usr/share/doc/slitaz-tools
79 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
81 # Gksu fake for pcmanfm
82 cd $fs/usr/bin
83 ln -s subox gksu
84 cd $WOK/$PACKAGE
86 chown -R root.root $fs
87 chmod -R 755 $fs/usr/bin
88 chmod -R 755 $fs/sbin
89 }
91 # Pre install commands.
92 pre_install()
93 {
94 local root
95 root=$1
96 # Backup file to restore with post install
97 echo "Creating backups of configs..."
98 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
99 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
100 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
101 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
102 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
103 }
105 # Post install
106 post_install()
107 {
108 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
109 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
110 etc/TZ
111 etc/motd
112 etc/keymap.conf
113 etc/X11/screen.conf
114 etc/locale.conf
115 etc/firewall.conf
116 EOT
117 echo "Restoring configs backups..."
118 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
119 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
120 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
121 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
122 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
123 }
125 repack_cleanup()
126 {
127 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
128 }