1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit toolchain-funcs
7 DESCRIPTION="Utility for spinning down hard disks after a period of idle time"
8 HOMEPAGE="http://hd-idle.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
13 KEYWORDS="~amd64 ~x86"
19 # CC_DEBUG is now used with linking only, so it's a good place
20 # to push the LDFLAGS into.
21 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" CC_DEBUG="${LDFLAGS}" || die
25 dosbin hd-idle || die "dosbin failed"
26 newinitd "${FILESDIR}"/hd-idle-init hd-idle || die "newinitd failed"
27 newconfd "${FILESDIR}"/hd-idle-conf hd-idle || die "newconfd failed"
31 if [[ ! -f /proc/diskstats ]]
33 ewarn "Please note that hd-idle uses /proc/diskstats to read disk"
34 ewarn "statistics. If this file is not present, hd-idle won't work."
35 ewarn "You should check your kernel configuration and make sure"
36 ewarn "it includes CONFIG_PROC_FS=y."