| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/bootchart2-0.14.2-r2.ebuild,v 1.3 2012/05/15 14:31:22 jlec Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
PYTHON_DEPEND="2"
|
| 8 |
SUPPORT_PYTHON_ABIS="1"
|
| 9 |
|
| 10 |
inherit linux-info python systemd toolchain-funcs
|
| 11 |
|
| 12 |
DESCRIPTION="Performance analysis and visualization of the system boot process"
|
| 13 |
HOMEPAGE="https://github.com/mmeeks/bootchart/"
|
| 14 |
SRC_URI="mirror://github/mmeeks/bootchart/${P}.tar.bz2"
|
| 15 |
|
| 16 |
SLOT="0"
|
| 17 |
LICENSE="GPL-2"
|
| 18 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
| 19 |
IUSE="svg"
|
| 20 |
|
| 21 |
RDEPEND="
|
| 22 |
!app-benchmarks/bootchart
|
| 23 |
dev-python/pycairo[svg?]
|
| 24 |
dev-python/pygtk
|
| 25 |
sys-apps/lsb-release"
|
| 26 |
DEPEND="${RDEPEND}"
|
| 27 |
|
| 28 |
CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT ~TMPFS"
|
| 29 |
|
| 30 |
src_prepare() {
|
| 31 |
tc-export CC
|
| 32 |
sed \
|
| 33 |
-e "/^install/s:py-install-compile::g" \
|
| 34 |
-e "/^VER/s:0.14.1:0.14.2:g" \
|
| 35 |
-e "/^SYSTEMD_UNIT_DIR/s:=.*:= $(systemd_get_unitdir):g" \
|
| 36 |
-i Makefile || die
|
| 37 |
}
|
| 38 |
|
| 39 |
src_test() {
|
| 40 |
testing() {
|
| 41 |
emake test
|
| 42 |
}
|
| 43 |
python_execute_function testing
|
| 44 |
}
|
| 45 |
|
| 46 |
src_install() {
|
| 47 |
export NO_PYTHON_COMPILE=0
|
| 48 |
export DOCDIR=/usr/share/doc/${PF}
|
| 49 |
default
|
| 50 |
|
| 51 |
# Note: LIBDIR is hardcoded as /lib in collector/common.h, so we shouldn't
|
| 52 |
# just change it. Since no libraries are installed, /lib is fine.
|
| 53 |
keepdir /lib/bootchart/tmpfs
|
| 54 |
|
| 55 |
installation() {
|
| 56 |
emake \
|
| 57 |
DESTDIR="${D}" \
|
| 58 |
PY_SITEDIR=$(python_get_sitedir) \
|
| 59 |
py-install-compile
|
| 60 |
}
|
| 61 |
python_execute_function installation
|
| 62 |
|
| 63 |
# does not like python3 as active interpreter
|
| 64 |
python_convert_shebangs 2 "${ED}"/usr/bin/pybootchartgui
|
| 65 |
|
| 66 |
newinitd "${FILESDIR}"/${PN}.init ${PN}
|
| 67 |
}
|
| 68 |
|
| 69 |
pkg_postinst() {
|
| 70 |
elog "Please add the init script to your default runlevel"
|
| 71 |
elog "rc-update add bootchart2 default"
|
| 72 |
echo
|
| 73 |
python_mod_optimize pybootchartgui
|
| 74 |
}
|
| 75 |
|
| 76 |
pkg_postrm() {
|
| 77 |
python_mod_cleanup pybootchartgui
|
| 78 |
}
|