cpupower-4.7.0-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # eutils: strip-linguas
  5. inherit eutils systemd toolchain-funcs
  6. DESCRIPTION="Shows and sets processor power related values"
  7. HOMEPAGE="https://www.kernel.org/"
  8. SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~x86"
  12. IUSE="cpufreq_bench debug nls"
  13. # File collision w/ headers of the deprecated cpufrequtils
  14. RDEPEND="sys-apps/pciutils
  15. !<sys-apps/linux-misc-apps-3.6-r2
  16. !sys-power/cpufrequtils"
  17. DEPEND="${RDEPEND}
  18. virtual/os-headers
  19. nls? ( sys-devel/gettext )"
  20. src_compile() {
  21. myemakeargs=(
  22. DEBUG=$(usex debug true false)
  23. V=1
  24. CPUFREQ_BENCH=$(usex cpufreq_bench true false)
  25. NLS=$(usex nls true false)
  26. docdir=/usr/share/doc/${PF}/${PN}
  27. mandir=/usr/share/man
  28. libdir=/usr/$(get_libdir)
  29. AR="$(tc-getAR)"
  30. CC="$(tc-getCC)"
  31. LD="$(tc-getCC)"
  32. STRIP=true
  33. OPTIMIZATION=
  34. VERSION=${PV}
  35. )
  36. if [[ -n ${LINGUAS+set} ]]; then
  37. strip-linguas -i po
  38. myemakeargs+=( LANGUAGES="${LINGUAS}" )
  39. fi
  40. emake "${myemakeargs[@]}"
  41. }
  42. src_install() {
  43. emake DESTDIR="${D}" "${myemakeargs[@]}" install
  44. dodoc README ToDo
  45. newconfd "${FILESDIR}"/conf.d-r2 cpupower
  46. newinitd "${FILESDIR}"/init.d-r4 cpupower
  47. systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service
  48. systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf
  49. }