wok view slitaz-tools/receipt @ rev 1179

Add speex codec
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 02 21:39:32 2008 +0000 (2008-08-02)
parents 4ae1b641e09a
children 534023d6e005
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"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 #
15 # This package is all build by genpkg, it provide /usr/share/examples tree,
16 # tazlito, tinyutils, licenses, documentation and artwork. This package
17 # provide also the Firewall deamon/config (/etc/firewall.conf).
18 #
19 genpkg_rules()
20 {
21 mkdir -p \
22 $fs/sbin \
23 $fs/usr/bin \
24 $fs/usr/sbin \
25 $fs/etc/X11 \
26 $fs/var/spool/cron/crontabs \
27 $fs/usr/lib/slitaz \
28 $fs/usr/share/doc/slitaz-tools \
29 $fs/usr/share/slitaz-tools/glade \
30 $fs/usr/share/slitaz-tools/installer
32 # /rootfs/*. Firewall exemples, licenses, pixmaps and desktop files.
33 cp -a $src/rootfs/* $fs
35 # Tinyutils.
36 cp -a $src/tinyutils/tazlocale $fs/sbin
37 touch $fs/etc/locale.conf
38 touch $fs/etc/motd
39 cp -a $src/tinyutils/tazkeymap $fs/sbin
40 touch $fs/etc/keymap.conf
41 touch $fs/etc/TZ
42 cp -a $src/tinyutils/gztazmod.sh $fs/sbin
43 cp -a $src/tinyutils/tazx $fs/usr/bin
44 touch $fs/etc/X11/screen.conf
45 cp -a $src/tinyutils/startx $fs/usr/bin
46 cp -a $src/tinyutils/history $fs/usr/bin
47 cp -a $src/tinyutils/tazdialog $fs/usr/bin
48 # Sound config
49 cp -a $src/tinyutils/soundconf $fs/usr/sbin
50 cp -a $src/tinyutils/setmixer $fs/usr/sbin
52 # Gtkdialog boxes
53 cp -a $src/tinyutils/bootfloppybox $fs/usr/bin
54 cp -a $src/tinyutils/burnbox $fs/usr/bin
55 cp -a $src/tinyutils/mountbox $fs/usr/bin
56 cp -a $src/tinyutils/netbox $fs/usr/bin
57 cp -a $src/tinyutils/scpbox $fs/usr/bin
58 cp -a $src/tinyutils/subox $fs/usr/bin
59 cp -a $src/tinyutils/torrentbox $fs/usr/bin
60 cp -a $src/tinyutils/desktopbox $fs/usr/bin
62 # Libs and Glade XML files.
63 cp -a $src/lib/[a-z]* $fs/usr/lib/slitaz
64 cp -a $src/glade/*.glade $fs/usr/share/slitaz-tools/glade
66 # Installer's
67 cp -a $src/installer/slitaz-installer $fs/usr/bin
68 cp -a $src/installer/*.msg $fs/usr/share/slitaz-tools/installer
70 # Tools doc in /usr/share/doc/slitaz-tools
71 cp $src/doc/* $fs/usr/share/doc/slitaz-tools
73 # Gksu fake for pcmanfm
74 cd $fs/usr/bin
75 ln -s subox gksu
76 cd $WOK/$PACKAGE
78 chown -R root.root $fs
79 chmod -R 755 $fs/usr/bin
80 chmod -R 755 $fs/sbin
81 }
83 # Pre install commands.
84 pre_install()
85 {
86 local root
87 root=$1
88 # Backup file to restore with post install
89 echo "Creating backups of configs..."
90 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
91 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
92 cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null
93 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
94 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
95 }
97 # Post install
98 post_install()
99 {
100 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
101 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
102 etc/TZ
103 etc/motd
104 etc/keymap.conf
105 etc/X11/screen.conf
106 etc/locale.conf
107 etc/firewall.conf
108 EOT
109 echo "Restoring configs backups..."
110 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
111 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
112 mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null
113 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
114 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
115 }
117 repack_cleanup()
118 {
119 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
120 }