wok-6.x annotate bootchart/receipt @ rev 3217

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