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