wok-next annotate bootchart/receipt @ rev 14789

Fix ownership and permissions for some files in some packages: adeskbar, ajaxterm, amsn, anacron, arora, asciiquarium, assaultcube-data, asterisk-sound-fr, asterisk-sound, attr-dev, attr, audacious, avidemux, awstats, bind-dev, binutils, blogotext, bootchart, btanks, bzip2-dev, c-client, cairo-dock.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jul 08 11:45:27 2013 +0300 (2013-07-08)
parents b792559721d1
children a5f6371c3254
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"
al@14789 8 WEB_SITE="http://www.bootchart.org/"
jozee@3217 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
jozee@3217 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
jozee@3567 11 TAGS="boot performance profile analyze"
jozee@3217 12
al@14789 13 SUGGESTED="pybootchartgui"
jozee@3217 14
jozee@3217 15 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@3217 16 genpkg_rules()
jozee@3217 17 {
al@14789 18 mkdir -p $fs/sbin $fs/etc
jozee@3217 19 cp -a $src/script/bootchartd $fs/sbin/bootchartd
al@14789 20 cp -a $src/script/bootchartd.conf $fs/etc
jozee@3217 21 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf
jozee@3217 22 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
al@14789 23 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' $fs/sbin/bootchartd
jozee@3217 24 }
jozee@3217 25
jozee@3217 26 post_install()
jozee@3217 27 {
al@14789 28 KERNEL_VERSION=$(uname -r | cut -d- -f1)
al@14789 29 MENU="$1/boot/grub/menu.lst"
al@14789 30 if [ -f "$MENU" ]; then
al@14789 31 # add an entry only if slitaz is installed and bootchart is not configured
al@14789 32 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then
al@14789 33 # FIXME: really use the first comer value?
al@14789 34 # (our lines will be LAST)
al@14789 35 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
al@14789 36 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
al@14789 37 # Add new kernel entry for bootchart and display information message
al@14789 38 echo "----"
al@14789 39 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
al@14789 40 tee -a "$MENU" << EOT
jozee@3217 41
jozee@5044 42 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
jozee@3217 43 $grub_dev
jozee@5044 44 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
jozee@3217 45 EOT
al@14789 46 echo "----"
jozee@3217 47 else
jozee@3217 48 echo "Grub menu.lst seems already configured to boot new Kernel..."
jozee@3217 49 fi
jozee@3217 50 fi
jozee@3217 51 }