wok-next view bootchart/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d5aab818505e
children
line source
1 # SliTaz package receipt.
3 PACKAGE="bootchart"
4 VERSION="1.20"
5 CATEGORY="misc"
6 TAGS="boot performance profile analysis"
7 SHORT_DESC="Boot process performance analyzer (add init=/sbin/bootchartd to boot options)"
8 MAINTAINER="maintainer@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="http://www.bootchart.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/ahkok/$PACKAGE/archive/v$VERSION.tar.gz"
15 SUGGESTED="pybootchartgui"
16 BUILD_DEPENDS="automake"
18 compile_rules()
19 {
20 ./autogen.sh &&
21 ./configure &&
22 make &&
23 make install
24 }
26 genpkg_rules()
27 {
28 mkdir -p $fs/sbin
29 mkdir -p $fs/etc
31 cp -a $src/bootchartd $fs/sbin/bootchartd
32 cp -a $src/bootchartd.conf.example $fs/etc/bootchartd.conf
33 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" \
34 $fs/etc/bootchartd.conf
35 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
36 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' \
37 $fs/sbin/bootchartd
38 chown -R root:root $fs
39 }
41 post_install()
42 {
43 KERNEL_VERSION=$(uname -r | cut -d- -f1)
44 MENU="$1/boot/grub/menu.lst"
45 if [ -f "$MENU" ]
46 then
47 # add an entry only if slitaz is installed and bootchart is not configured
48 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"
49 then
50 # FIXME: really use the first comer value?
51 # (our lines will be LAST)
52 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
53 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
54 # Add new kernel entry for bootchart and display information message
55 echo
56 echo "----"
57 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
58 tee -a "$MENU" << EOT
60 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
61 $grub_dev
62 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
63 EOT
64 echo "----"
65 else
66 echo
67 echo "Grub menu.lst seems already configured to boot new Kernel..."
68 fi
69 fi
70 }