1 |
commit: 880e3375c1d7a09c7f8372065279032cba474e96 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 1 16:13:25 2016 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 1 16:15:25 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=880e3375 |
7 |
|
8 |
sys-apps/tuned: fix rpm lookup err |
9 |
|
10 |
Gentoo-Bug: 563396 |
11 |
|
12 |
Package-Manager: portage-2.3.2 |
13 |
|
14 |
sys-apps/tuned/files/tuned-2.7.1-makefile.patch | 15 +++++++ |
15 |
sys-apps/tuned/tuned-2.7.1-r2.ebuild | 52 +++++++++++++++++++++++++ |
16 |
2 files changed, 67 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/tuned/files/tuned-2.7.1-makefile.patch b/sys-apps/tuned/files/tuned-2.7.1-makefile.patch |
19 |
new file mode 100644 |
20 |
index 00000000..54e89a1 |
21 |
--- /dev/null |
22 |
+++ b/sys-apps/tuned/files/tuned-2.7.1-makefile.patch |
23 |
@@ -0,0 +1,15 @@ |
24 |
+diff --git a/Makefile b/Makefile |
25 |
+index 9e2d8fe..6de30d0 100644 |
26 |
+--- a/Makefile |
27 |
++++ b/Makefile |
28 |
+@@ -19,8 +19,8 @@ else |
29 |
+ GIT_PSUFFIX = .$(GIT_SUFFIX) |
30 |
+ RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX) |
31 |
+ endif |
32 |
+-UNITDIR = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo /usr/lib/systemd/system) |
33 |
+-TMPFILESDIR = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo /usr/lib/tmpfiles.d) |
34 |
++UNITDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_unitdir}' 2>/dev/null; else echo /usr/lib/systemd/system; fi) |
35 |
++TMPFILESDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_tmpfilesdir}' 2>/dev/null; else echo /usr/lib/tmpfiles.d; fi) |
36 |
+ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX) |
37 |
+ |
38 |
+ DATADIR = /usr/share |
39 |
|
40 |
diff --git a/sys-apps/tuned/tuned-2.7.1-r2.ebuild b/sys-apps/tuned/tuned-2.7.1-r2.ebuild |
41 |
new file mode 100644 |
42 |
index 00000000..6c58913 |
43 |
--- /dev/null |
44 |
+++ b/sys-apps/tuned/tuned-2.7.1-r2.ebuild |
45 |
@@ -0,0 +1,52 @@ |
46 |
+# Copyright 1999-2016 Gentoo Foundation |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+# $Id$ |
49 |
+ |
50 |
+EAPI=5 |
51 |
+ |
52 |
+PYTHON_COMPAT=( python2_7 ) |
53 |
+ |
54 |
+inherit python-single-r1 systemd |
55 |
+ |
56 |
+DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices" |
57 |
+HOMEPAGE="https://fedorahosted.org/tuned/" |
58 |
+SRC_URI="https://fedorahosted.org/releases/t/u/tuned/${P}.tar.bz2" |
59 |
+ |
60 |
+LICENSE="GPL-2" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64 ~x86" |
63 |
+IUSE="" |
64 |
+ |
65 |
+COMMON_DEPEND="${PYTHON_DEPS} |
66 |
+ dev-python/configobj[${PYTHON_USEDEP}] |
67 |
+ dev-python/decorator[${PYTHON_USEDEP}] |
68 |
+ dev-python/pyudev[${PYTHON_USEDEP}] |
69 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
70 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
71 |
+" |
72 |
+DEPEND="${COMMON_DEPEND}" |
73 |
+RDEPEND="${COMMON_DEPEND} |
74 |
+ sys-apps/dbus |
75 |
+ sys-apps/ethtool |
76 |
+ sys-power/powertop |
77 |
+ sys-process/procps |
78 |
+ dev-util/systemtap |
79 |
+" |
80 |
+ |
81 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ epatch "${FILESDIR}"/${P}-sysctl.patch |
85 |
+ epatch "${FILESDIR}"/${P}-makefile.patch |
86 |
+ |
87 |
+ sed -i \ |
88 |
+ -e "/\$(DESTDIR)\/run\/tuned/d" \ |
89 |
+ Makefile ||die |
90 |
+} |
91 |
+ |
92 |
+src_install() { |
93 |
+ default |
94 |
+ newinitd "${FILESDIR}"/tuned.initd tuned |
95 |
+ |
96 |
+ python_fix_shebang "${ED}" |
97 |
+} |