wok-current view bootchart/receipt @ rev 4149
Fix: xfce4 dependency looping
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Sep 20 16:13:53 2009 +0000 (2009-09-20) |
parents | a60208fea30c |
children | 1f027408aeca |
line source
1 # SliTaz package receipt.
3 PACKAGE="bootchart"
4 VERSION="0.9"
5 CATEGORY="misc"
6 SHORT_DESC="boot process performance analyzer (add init=/sbin/bootchartd to boot options)"
7 MAINTAINER="jozee@slitaz.org"
8 SUGGESTED="pybootchartgui"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.bootchart.org/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="boot performance profile analyze"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/sbin $fs/etc
20 cp -a $src/script/bootchartd $fs/sbin/bootchartd
21 cp -a $src/script/bootchartd.conf $fs/etc
22 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf
23 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
24 sed -i "s|\/usr\/bin\/bootchart|\/usr\/bin\/pybootchartgui|g" $fs/sbin/bootchartd
26 }
28 post_install()
29 {
30 if [ -f "$1/boot/grub/menu.lst" ]; then
31 if ! grep -q "vmlinuz-$VERSION-slitaz" $1/boot/grub/menu.lst; then
32 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
33 grub_dev=`cat $1/boot/grub/menu.lst | grep "root.* (" | head -n 1`
34 # Add new kernel entry in case of upgrade for installed system.
35 cat >> $1/boot/grub/menu.lst << EOT
37 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) with bootchart
38 $grub_dev
39 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev init=/sbin/bootchartd
40 EOT
41 # Display information message.
42 cat <<EOT
43 ----
44 GRUB is installed, these tree lines has been added to the menu.lst:
46 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
47 $grub_dev
48 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev init=/sbin/bootchartd
49 ----
50 EOT
51 else
52 echo "Grub menu.lst seems already configured to boot new Kernel..."
53 fi
54 fi
55 }