wok-current view bootchart/receipt @ rev 25066

updated alsa-lib, alsa-lib-dev and alsa-utils (1.2.2 -> 1.2.7)
author Hans-G?nter Theisgen
date Fri Jun 10 13:35:13 2022 +0100 (2022-06-10)
parents 8e41c082cb01
children 73f36875e5a7
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 LICENSE="GPL2"
9 WEB_SITE="http://github.com/sofar/bootchart"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="boot performance profile analysis"
14 SUGGESTED="pybootchartgui"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - $WEB_SITE/tags 2>/dev/null | \
20 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/sbin $fs/etc
27 cp -a $src/script/bootchartd $fs/sbin/bootchartd
28 cp -a $src/script/bootchartd.conf $fs/etc
29 sed -i "s/SAMPLE_PERIOD=0.2/SAMPLE_PERIOD=1/" $fs/etc/bootchartd.conf
30 sed -i "s/kdm_greet/kdm_greet slim /" $fs/sbin/bootchartd
31 sed -i 's|/usr/bin/bootchart|/usr/bin/pybootchartgui|g' $fs/sbin/bootchartd
32 chown -R root:root $fs
33 }
35 post_install()
36 {
37 KERNEL_VERSION=$(uname -r | cut -d- -f1)
38 MENU="$1/boot/grub/menu.lst"
39 if [ -f "$MENU" ]; then
40 # add an entry only if slitaz is installed and bootchart is not configured
41 if ! grep -q "vmlinuz-$KERNEL_VERSION-slitaz.*sbin/bootchartd.*" "$MENU"; then
42 # FIXME: really use the first comer value?
43 # (our lines will be LAST)
44 root_dev=`sed -n 's/.*root=\([^ ]*\).*/\1/p' "$MENU" | head -n1`
45 grub_dev=`sed -n '/^[^#]*root.* (/p' "$MENU" | head -n1`
46 # Add new kernel entry for bootchart and display information message
47 echo
48 echo "----"
49 echo "GRUB is installed, these tree lines has been added to the menu.lst:"
50 tee -a "$MENU" << EOT
52 title SliTaz GNU/Linux (Kernel $KERNEL_VERSION-slitaz) with bootchart
53 $grub_dev
54 kernel /boot/vmlinuz-$KERNEL_VERSION-slitaz root=$root_dev init=/sbin/bootchartd
55 EOT
56 echo "----"
57 else
58 echo
59 echo "Grub menu.lst seems already configured to boot new Kernel..."
60 fi
61 fi
62 }