wok annotate bootchart/receipt @ rev 13429

partclone: add btrfs & hfsplus support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 04 11:53:21 2012 +0200 (2012-10-04)
parents 1f027408aeca
children a7b54d88ae54
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@3567 12 TAGS="boot performance profile analyze"
jozee@3217 13
jozee@3217 14
jozee@3217 15
jozee@3217 16 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@3217 17 genpkg_rules()
jozee@3217 18 {
jozee@3217 19 mkdir -p $fs/sbin $fs/etc
jozee@3217 20 cp -a $src/script/bootchartd $fs/sbin/bootchartd
jozee@3217 21 cp -a $src/script/bootchartd.conf $fs/etc
jozee@3217 22 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf
jozee@3217 23 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
jozee@3217 24 sed -i "s|\/usr\/bin\/bootchart|\/usr\/bin\/pybootchartgui|g" $fs/sbin/bootchartd
jozee@3217 25
jozee@3217 26 }
jozee@3217 27
jozee@3217 28 post_install()
jozee@3217 29 {
jozee@5047 30 KERNEL_VERSION=`uname -a | cut -d ' ' -f3 | cut -d '-' -f1`
jozee@3217 31 if [ -f "$1/boot/grub/menu.lst" ]; then
jozee@5047 32 # add an entry only if slitaz is installed and bootchart is not configured
jozee@5047 33 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" $1/boot/grub/menu.lst; then
jozee@3217 34 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
jozee@3217 35 grub_dev=`cat $1/boot/grub/menu.lst | grep "root.* (" | head -n 1`
jozee@5047 36 # Add new kernel entry for bootchart
jozee@3217 37 cat >> $1/boot/grub/menu.lst << EOT
jozee@3217 38
jozee@5044 39 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
jozee@3217 40 $grub_dev
jozee@5044 41 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
jozee@3217 42 EOT
jozee@3217 43 # Display information message.
jozee@3217 44 cat <<EOT
jozee@3217 45 ----
jozee@3217 46 GRUB is installed, these tree lines has been added to the menu.lst:
jozee@3217 47
jozee@5044 48 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz)
jozee@3217 49 $grub_dev
jozee@5044 50 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
jozee@3217 51 ----
jozee@3217 52 EOT
jozee@3217 53 else
jozee@3217 54 echo "Grub menu.lst seems already configured to boot new Kernel..."
jozee@3217 55 fi
jozee@3217 56 fi
jozee@3217 57 }