wok-next view bootchart/receipt @ rev 21247

updated cyrus-imapd (2.4.17 -> 3.0.12)
author Hans-G?nter Theisgen
date Thu Dec 05 16:28:27 2019 +0100 (2019-12-05)
parents a6f7b6b890c2
children 87b41db6ebdb
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="devel@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 genpkg_rules() {
17 mkdir -p $fs/sbin $fs/etc
18 cp -a $src/script/bootchartd $fs/sbin/bootchartd
19 cp -a $src/script/bootchartd.conf $fs/etc
20 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf
21 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
22 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' $fs/sbin/bootchartd
23 chown -R root:root $fs
24 }
26 post_install() {
27 KERNEL_VERSION=$(uname -r | cut -d- -f1)
28 MENU="$1/boot/grub/menu.lst"
29 if [ -f "$MENU" ]; then
30 # add an entry only if slitaz is installed and bootchart is not configured
31 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then
32 # FIXME: really use the first comer value?
33 # (our lines will be LAST)
34 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
35 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
36 # Add new kernel entry for bootchart and display information message
37 echo
38 echo "----"
39 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
40 tee -a "$MENU" << EOT
42 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
43 $grub_dev
44 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
45 EOT
46 echo "----"
47 else
48 echo
49 echo "Grub menu.lst seems already configured to boot new Kernel..."
50 fi
51 fi
52 }