hdparm-9.51.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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. PATCHES=(
  13. "${FILESDIR}"/${PN}-9.48-sysmacros.patch #580052
  14. "${FILESDIR}"/${PN}-9.51-build.patch
  15. )
  16. src_prepare() {
  17. epatch "${PATCHES[@]}"
  18. use static && append-ldflags -static
  19. }
  20. src_configure() {
  21. tc-export CC
  22. export STRIP=:
  23. }
  24. src_install() {
  25. into /
  26. dosbin hdparm contrib/idectl
  27. newinitd "${FILESDIR}"/hdparm-init-8 hdparm
  28. newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
  29. doman hdparm.8
  30. dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
  31. docinto wiper
  32. dodoc wiper/{README.txt,wiper.sh}
  33. docompress -x /usr/share/doc/${PF}/wiper/wiper.sh
  34. }