wok view bootchart/receipt @ rev 14792

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