diff options
author | Yixun Lan <dlan@gentoo.org> | 2016-11-02 00:13:25 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2016-11-02 00:15:25 +0800 |
commit | 880e3375c1d7a09c7f8372065279032cba474e96 (patch) | |
tree | 6736cd56ce248596eb18e3686d5025a2fd0597cb /sys-apps | |
parent | dev-util/bcc: require at least elfutils-0.166 for GElf_Nhdr in gelf.h (diff) | |
download | gentoo-880e3375c1d7a09c7f8372065279032cba474e96.tar.gz gentoo-880e3375c1d7a09c7f8372065279032cba474e96.tar.bz2 gentoo-880e3375c1d7a09c7f8372065279032cba474e96.zip |
sys-apps/tuned: fix rpm lookup err
Gentoo-Bug: 563396
Package-Manager: portage-2.3.2
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/tuned/files/tuned-2.7.1-makefile.patch | 15 | ||||
-rw-r--r-- | sys-apps/tuned/tuned-2.7.1-r2.ebuild | 52 |
2 files changed, 67 insertions, 0 deletions
diff --git a/sys-apps/tuned/files/tuned-2.7.1-makefile.patch b/sys-apps/tuned/files/tuned-2.7.1-makefile.patch new file mode 100644 index 000000000000..54e89a11b697 --- /dev/null +++ b/sys-apps/tuned/files/tuned-2.7.1-makefile.patch @@ -0,0 +1,15 @@ +diff --git a/Makefile b/Makefile +index 9e2d8fe..6de30d0 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,8 +19,8 @@ else + GIT_PSUFFIX = .$(GIT_SUFFIX) + RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX) + endif +-UNITDIR = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo /usr/lib/systemd/system) +-TMPFILESDIR = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo /usr/lib/tmpfiles.d) ++UNITDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_unitdir}' 2>/dev/null; else echo /usr/lib/systemd/system; fi) ++TMPFILESDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_tmpfilesdir}' 2>/dev/null; else echo /usr/lib/tmpfiles.d; fi) + VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX) + + DATADIR = /usr/share diff --git a/sys-apps/tuned/tuned-2.7.1-r2.ebuild b/sys-apps/tuned/tuned-2.7.1-r2.ebuild new file mode 100644 index 000000000000..6c58913ae030 --- /dev/null +++ b/sys-apps/tuned/tuned-2.7.1-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit python-single-r1 systemd + +DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices" +HOMEPAGE="https://fedorahosted.org/tuned/" +SRC_URI="https://fedorahosted.org/releases/t/u/tuned/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +COMMON_DEPEND="${PYTHON_DEPS} + dev-python/configobj[${PYTHON_USEDEP}] + dev-python/decorator[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND} + sys-apps/dbus + sys-apps/ethtool + sys-power/powertop + sys-process/procps + dev-util/systemtap +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-sysctl.patch + epatch "${FILESDIR}"/${P}-makefile.patch + + sed -i \ + -e "/\$(DESTDIR)\/run\/tuned/d" \ + Makefile ||die +} + +src_install() { + default + newinitd "${FILESDIR}"/tuned.initd tuned + + python_fix_shebang "${ED}" +} |