sys-apps/irqbalance: arm64 keyworded (bug #721536)
[gentoo.git] / sys-apps / tuned / tuned-2.13.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit python-single-r1 xdg-utils
9
10 DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices"
11 HOMEPAGE="https://github.com/redhat-performance/tuned"
12 SRC_URI="https://github.com/redhat-performance/tuned/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64"
17
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19
20 DEPEND="
21         ${PYTHON_DEPS}
22         $(python_gen_cond_dep '
23                 dev-python/configobj[${PYTHON_MULTI_USEDEP}]
24                 dev-python/decorator[${PYTHON_MULTI_USEDEP}]
25                 dev-python/pyudev[${PYTHON_MULTI_USEDEP}]
26                 dev-python/dbus-python[${PYTHON_MULTI_USEDEP}]
27                 dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
28                 dev-python/python-linux-procfs[${PYTHON_MULTI_USEDEP}]
29         ')"
30
31 RDEPEND="
32         ${DEPEND}
33         sys-apps/dbus
34         sys-apps/ethtool
35         sys-power/powertop
36         dev-util/systemtap"
37
38 RESTRICT="test"
39
40 src_prepare() {
41         default
42
43         sed -i \
44                 -e "/^export DOCDIR/s/$/&\-\$(VERSION)/g" \
45                 -e "/\$(DESTDIR)\/run\/tuned/d" \
46                 -e "/\$(DESTDIR)\/var\/lib\/tuned/d" \
47                 -e "/\$(DESTDIR)\/var\/log\/tuned/d" \
48                 Makefile || die
49 }
50
51 src_install() {
52         default
53
54         newinitd "${FILESDIR}/${PN}.initd" "${PN}"
55         python_fix_shebang "${D}"
56         python_optimize
57 }
58
59 pkg_postinst() {
60         xdg_icon_cache_update
61 }