powertop-1.13.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=3
  4. inherit toolchain-funcs eutils
  5. DESCRIPTION="tool that helps you find what software is using the most power"
  6. HOMEPAGE="http://www.lesswatts.org/projects/powertop/"
  7. SRC_URI="http://www.lesswatts.org/projects/powertop/download/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux"
  11. IUSE="unicode"
  12. DEPEND="sys-libs/ncurses[unicode?]
  13. sys-devel/gettext"
  14. RDEPEND="sys-libs/ncurses[unicode?]
  15. virtual/libintl
  16. sys-apps/pciutils"
  17. src_prepare() {
  18. sed -i '/${CFLAGS}/s:$: ${LDFLAGS}:' Makefile
  19. use unicode || sed -i 's:-lncursesw:-lncurses:' Makefile
  20. }
  21. src_configure() {
  22. tc-export CC
  23. }
  24. src_install() {
  25. emake install DESTDIR="${ED}" || die
  26. dodoc Changelog README
  27. gunzip "${ED}"/usr/share/man/man1/powertop.1.gz
  28. }
  29. pkg_postinst() {
  30. echo
  31. einfo "For PowerTOP to work best, use a Linux kernel with the"
  32. einfo "tickless idle (NO_HZ) feature enabled (version 2.6.21 or later)"
  33. echo
  34. }