wok annotate bootchart/receipt @ rev 14920

Up: firefox-langpack-pt_BR (17.0.7esr)
author Richard Dunbar <mojo@slitaz.org>
date Tue Aug 06 01:24:03 2013 +0000 (2013-08-06)
parents a7b54d88ae54
children 380ffe05937a
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"
al@14789 8 WEB_SITE="http://www.bootchart.org/"
jozee@3217 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
jozee@3217 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
jozee@3567 11 TAGS="boot performance profile analyze"
jozee@3217 12
al@14789 13 SUGGESTED="pybootchartgui"
jozee@3217 14
jozee@3217 15 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@3217 16 genpkg_rules()
jozee@3217 17 {
al@14789 18 mkdir -p $fs/sbin $fs/etc
jozee@3217 19 cp -a $src/script/bootchartd $fs/sbin/bootchartd
al@14789 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
al@14789 23 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' $fs/sbin/bootchartd
al@14792 24 chown -R root:root $fs
jozee@3217 25 }
jozee@3217 26
jozee@3217 27 post_install()
jozee@3217 28 {
al@14789 29 KERNEL_VERSION=$(uname -r | cut -d- -f1)
al@14789 30 MENU="$1/boot/grub/menu.lst"
al@14789 31 if [ -f "$MENU" ]; then
al@14789 32 # add an entry only if slitaz is installed and bootchart is not configured
al@14789 33 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then
al@14789 34 # FIXME: really use the first comer value?
al@14789 35 # (our lines will be LAST)
al@14789 36 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
al@14789 37 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
al@14789 38 # Add new kernel entry for bootchart and display information message
al@14789 39 echo "----"
al@14789 40 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
al@14789 41 tee -a "$MENU" << EOT
jozee@3217 42
jozee@5044 43 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
jozee@3217 44 $grub_dev
jozee@5044 45 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
jozee@3217 46 EOT
al@14789 47 echo "----"
jozee@3217 48 else
jozee@3217 49 echo "Grub menu.lst seems already configured to boot new Kernel..."
jozee@3217 50 fi
jozee@3217 51 fi
jozee@3217 52 }