5c52393e7064aaa99aca5d13bf318d16a4faabde
[gentoo.git] / sys-apps / hdparm / hdparm-9.56.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs flag-o-matic
7
8 DESCRIPTION="Utility to change hard drive performance parameters"
9 HOMEPAGE="https://sourceforge.net/projects/hdparm/"
10 SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz"
11
12 LICENSE="BSD GPL-2" # GPL-2 only
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
15 IUSE="static"
16
17 PATCHES=(
18         "${FILESDIR}"/${PN}-9.51-build.patch
19 )
20
21 src_prepare() {
22         default
23         use static && append-ldflags -static
24 }
25
26 src_configure() {
27         tc-export CC
28         export STRIP=:
29 }
30
31 src_install() {
32         into /
33         dosbin hdparm contrib/idectl
34
35         newinitd "${FILESDIR}"/hdparm-init-8 hdparm
36         newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
37
38         doman hdparm.8
39         dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
40         docinto wiper
41         dodoc wiper/{README.txt,wiper.sh}
42         docompress -x /usr/share/doc/${PF}/wiper/wiper.sh
43 }