wok view bootchart/receipt @ rev 21638
laptop-mode-tools: added python to depends (thanks mistfire)
author | Hans-G?nter Theisgen |
---|---|
date | Wed May 29 15:29:03 2019 +0100 (2019-05-29) |
parents | fca172c323cf |
children | 8e41c082cb01 |
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 analysis"
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 "----"
42 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
43 tee -a "$MENU" << EOT
45 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
46 $grub_dev
47 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
48 EOT
49 echo "----"
50 else
51 echo
52 echo "Grub menu.lst seems already configured to boot new Kernel..."
53 fi
54 fi
55 }