wok-6.x annotate bootchart/receipt @ rev 21201
Add python-pip (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Apr 06 17:02:36 2019 +0200 (2019-04-06) |
parents | fca172c323cf |
children | 8e41c082cb01 |
rev | line source |
---|---|
jozee@3217 | 1 # SliTaz package receipt. |
jozee@3217 | 2 |
jozee@3217 | 3 PACKAGE="bootchart" |
jozee@3217 | 4 VERSION="0.9" |
jozee@3217 | 5 CATEGORY="misc" |
jozee@3217 | 6 SHORT_DESC="boot process performance analyzer (add init=/sbin/bootchartd to boot options)" |
jozee@3217 | 7 MAINTAINER="jozee@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
al@14789 | 9 WEB_SITE="http://www.bootchart.org/" |
jozee@3217 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
jozee@3217 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
al@19168 | 12 TAGS="boot performance profile analysis" |
jozee@3217 | 13 |
al@14789 | 14 SUGGESTED="pybootchartgui" |
jozee@3217 | 15 |
jozee@3217 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@3217 | 17 genpkg_rules() |
jozee@3217 | 18 { |
al@14789 | 19 mkdir -p $fs/sbin $fs/etc |
jozee@3217 | 20 cp -a $src/script/bootchartd $fs/sbin/bootchartd |
al@14789 | 21 cp -a $src/script/bootchartd.conf $fs/etc |
jozee@3217 | 22 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf |
jozee@3217 | 23 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd |
al@14789 | 24 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' $fs/sbin/bootchartd |
al@14792 | 25 chown -R root:root $fs |
jozee@3217 | 26 } |
jozee@3217 | 27 |
jozee@3217 | 28 post_install() |
jozee@3217 | 29 { |
al@14789 | 30 KERNEL_VERSION=$(uname -r | cut -d- -f1) |
al@14789 | 31 MENU="$1/boot/grub/menu.lst" |
al@14789 | 32 if [ -f "$MENU" ]; then |
al@14789 | 33 # add an entry only if slitaz is installed and bootchart is not configured |
al@14789 | 34 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then |
al@14789 | 35 # FIXME: really use the first comer value? |
al@14789 | 36 # (our lines will be LAST) |
al@14789 | 37 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1` |
al@14789 | 38 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1` |
al@14789 | 39 # Add new kernel entry for bootchart and display information message |
al@18668 | 40 echo |
al@14789 | 41 echo "----" |
al@14789 | 42 echo "GRUB is installed, these tree lines has been added to the menu.lst:" |
al@14789 | 43 tee -a "$MENU" << EOT |
jozee@3217 | 44 |
jozee@5044 | 45 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart |
jozee@3217 | 46 $grub_dev |
jozee@5044 | 47 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd |
jozee@3217 | 48 EOT |
al@14789 | 49 echo "----" |
jozee@3217 | 50 else |
al@18668 | 51 echo |
jozee@3217 | 52 echo "Grub menu.lst seems already configured to boot new Kernel..." |
jozee@3217 | 53 fi |
jozee@3217 | 54 fi |
jozee@3217 | 55 } |