summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-04-02 13:06:33 +0000
committerJustin Lecher <jlec@gentoo.org>2012-04-02 13:06:33 +0000
commit0bb7ddd91a87bb8b6a88139a97fafe5e5eb5efad (patch)
tree564d723e7214cd7dd3e04fd1af754b30c65f88dd /app-benchmarks/bootchart2
parentVersion bump (diff)
downloadgentoo-2-0bb7ddd91a87bb8b6a88139a97fafe5e5eb5efad.tar.gz
gentoo-2-0bb7ddd91a87bb8b6a88139a97fafe5e5eb5efad.tar.bz2
gentoo-2-0bb7ddd91a87bb8b6a88139a97fafe5e5eb5efad.zip
add init script for termination
(Portage version: 2.2.0_alpha96/cvs/Linux x86_64)
Diffstat (limited to 'app-benchmarks/bootchart2')
-rw-r--r--app-benchmarks/bootchart2/ChangeLog8
-rw-r--r--app-benchmarks/bootchart2/bootchart2-0.14.2-r1.ebuild (renamed from app-benchmarks/bootchart2/bootchart2-0.14.2.ebuild)32
-rw-r--r--app-benchmarks/bootchart2/files/bootchart2.init26
3 files changed, 54 insertions, 12 deletions
diff --git a/app-benchmarks/bootchart2/ChangeLog b/app-benchmarks/bootchart2/ChangeLog
index e60090c6985e..e7971b771f1d 100644
--- a/app-benchmarks/bootchart2/ChangeLog
+++ b/app-benchmarks/bootchart2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-benchmarks/bootchart2
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/ChangeLog,v 1.1 2012/04/02 07:19:16 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/ChangeLog,v 1.2 2012/04/02 13:06:32 jlec Exp $
+
+*bootchart2-0.14.2-r1 (02 Apr 2012)
+
+ 02 Apr 2012; Justin Lecher <jlec@gentoo.org> +files/bootchart2.init,
+ -bootchart2-0.14.2.ebuild, +bootchart2-0.14.2-r1.ebuild:
+ add init script for termination
*bootchart2-0.14.2 (02 Apr 2012)
diff --git a/app-benchmarks/bootchart2/bootchart2-0.14.2.ebuild b/app-benchmarks/bootchart2/bootchart2-0.14.2-r1.ebuild
index 41779baeb71b..9f203099d298 100644
--- a/app-benchmarks/bootchart2/bootchart2-0.14.2.ebuild
+++ b/app-benchmarks/bootchart2/bootchart2-0.14.2-r1.ebuild
@@ -1,12 +1,11 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/bootchart2-0.14.2.ebuild,v 1.1 2012/04/02 07:19:16 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/bootchart2-0.14.2-r1.ebuild,v 1.1 2012/04/02 13:06:32 jlec Exp $
EAPI=4
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABI="2.7-pypy-*"
inherit linux-info python systemd toolchain-funcs
@@ -21,9 +20,9 @@ IUSE="svg"
RDEPEND="
!app-benchmarks/bootchart
- dev-python/pycairo[svg=]"
-DEPEND="${RDEPEND}
-"
+ dev-python/pycairo[svg=]
+ dev-python/pygtk"
+DEPEND="${RDEPEND}"
CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT ~TMPFS"
@@ -36,6 +35,13 @@ src_prepare() {
-i Makefile || die
}
+src_test() {
+ testing() {
+ emake test
+ }
+ python_execute_function testing
+}
+
src_install() {
export NO_PYTHON_COMPILE=0
export DOCDIR=/usr/share/doc/${PF}
@@ -52,16 +58,20 @@ src_install() {
py-install-compile
}
python_execute_function installation
-}
-src_test() {
- testing() {
- emake test
- }
- python_execute_function testing
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
}
pkg_postinst() {
+ elog "Please add the init script to your default runlevel"
+ elog "rc-update add bootchart2 default"
+ echo ""
elog "Please review /usr/share/doc/${PF}/README"
elog "for further usage informations."
+ echo
+ python_mod_optimize pybootchartgui
+}
+
+pkg_postrm() {
+ python_mod_cleanup pybootchartgui
}
diff --git a/app-benchmarks/bootchart2/files/bootchart2.init b/app-benchmarks/bootchart2/files/bootchart2.init
new file mode 100644
index 000000000000..4670fe12d096
--- /dev/null
+++ b/app-benchmarks/bootchart2/files/bootchart2.init
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/files/bootchart2.init,v 1.1 2012/04/02 13:06:33 jlec Exp $
+
+depend() {
+ use localmount
+}
+
+start() {
+ if /bin/grep -q "rdinitrd=/sbin/bootchartd" /proc/cmdline; then
+ if /bin/pidof bootchart-collector> /dev/null 2>&1; then
+ ebegin "Scheduling termination of Bootchart"
+ /sbin/bootchartd start
+ /sbin/bootchartd wait &
+ eend $?
+ else
+ elog "No bootchart process found!"
+ eindent
+ elog "This script does not start bootchart, but only schedules its termination."
+ elog "Bootchart should be started from the kernel command line."
+ elog "Please check the README on how to do that."
+ eoutdent
+ eend 0
+ fi
+}