hdparm-9.48.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit toolchain-funcs flag-o-matic eutils
  5. DESCRIPTION="Utility to change hard drive performance parameters"
  6. HOMEPAGE="https://sourceforge.net/projects/hdparm/"
  7. SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz"
  8. LICENSE="BSD GPL-2" # GPL-2 only
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
  11. IUSE="static"
  12. src_prepare() {
  13. epatch "${FILESDIR}"/${P}-sysmacros.patch #580052
  14. use static && append-ldflags -static
  15. sed -i \
  16. -e "/^CFLAGS/ s:-O2:${CFLAGS}:" \
  17. -e "/^LDFLAGS/ s:-s:${LDFLAGS}:" \
  18. Makefile || die "sed"
  19. }
  20. src_compile() {
  21. emake STRIP=: CC="$(tc-getCC)"
  22. }
  23. src_install() {
  24. into /
  25. dosbin hdparm contrib/idectl
  26. newinitd "${FILESDIR}"/hdparm-init-8 hdparm
  27. newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
  28. doman hdparm.8
  29. dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
  30. docinto wiper
  31. dodoc wiper/{README.txt,wiper.sh}
  32. }