wok view bootchart/receipt @ rev 16504

Fix tcl build on ARM and add tcllib
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 24 03:51:21 2014 +0200 (2014-04-24)
parents a5f6371c3254
children fca172c323cf
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 LICENSE="GPL2"
9 WEB_SITE="http://www.bootchart.org/"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="boot performance profile analyze"
14 SUGGESTED="pybootchartgui"
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
25 chown -R root:root $fs
26 }
28 post_install()
29 {
30 KERNEL_VERSION=$(uname -r | cut -d- -f1)
31 MENU="$1/boot/grub/menu.lst"
32 if [ -f "$MENU" ]; then
33 # add an entry only if slitaz is installed and bootchart is not configured
34 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then
35 # FIXME: really use the first comer value?
36 # (our lines will be LAST)
37 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
38 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
39 # Add new kernel entry for bootchart and display information message
40 echo "----"
41 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
42 tee -a "$MENU" << EOT
44 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
45 $grub_dev
46 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
47 EOT
48 echo "----"
49 else
50 echo "Grub menu.lst seems already configured to boot new Kernel..."
51 fi
52 fi
53 }