diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-12-28 20:49:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-12-28 20:49:39 +0000 |
commit | 03460f31741bb5bb110138882f0bd6a4652abc6b (patch) | |
tree | 142501eea9d26e12b8b9d65f53fbf79d2bc6649a /sys-apps/hdparm | |
parent | Fixed xmldoclet handling. (diff) | |
download | gentoo-2-03460f31741bb5bb110138882f0bd6a4652abc6b.tar.gz gentoo-2-03460f31741bb5bb110138882f0bd6a4652abc6b.tar.bz2 gentoo-2-03460f31741bb5bb110138882f0bd6a4652abc6b.zip |
Version bump #116979 by Michael Cramer and fix init.d script for cdrom devices #104683 by Heiko Baums / Stefan Illner.
(Portage version: 2.1_pre2)
Diffstat (limited to 'sys-apps/hdparm')
-rw-r--r-- | sys-apps/hdparm/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/hdparm/files/digest-hdparm-6.3 | 1 | ||||
-rw-r--r-- | sys-apps/hdparm/files/hdparm-init-7 | 20 | ||||
-rw-r--r-- | sys-apps/hdparm/hdparm-6.3.ebuild | 40 |
4 files changed, 58 insertions, 14 deletions
diff --git a/sys-apps/hdparm/ChangeLog b/sys-apps/hdparm/ChangeLog index 5dfe319cbbdd..5657602164ce 100644 --- a/sys-apps/hdparm/ChangeLog +++ b/sys-apps/hdparm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/hdparm -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.70 2005/09/26 21:40:29 matsuu Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.71 2005/12/28 20:49:39 vapier Exp $ + +*hdparm-6.3 (28 Dec 2005) + + 28 Dec 2005; Mike Frysinger <vapier@gentoo.org> files/hdparm-init-7, + +hdparm-6.3.ebuild: + Version bump #116979 by Michael Cramer and fix init.d script for cdrom + devices #104683 by Heiko Baums / Stefan Illner. 26 Sep 2005; MATSUU Takuto <matsuu@gentoo.org> hdparm-5.9.ebuild: Stable on sh. diff --git a/sys-apps/hdparm/files/digest-hdparm-6.3 b/sys-apps/hdparm/files/digest-hdparm-6.3 new file mode 100644 index 000000000000..e01d72f6dfcd --- /dev/null +++ b/sys-apps/hdparm/files/digest-hdparm-6.3 @@ -0,0 +1 @@ +MD5 0c12672f3a09c14ad0b0882f15fc9389 hdparm-6.3.tar.gz 44052 diff --git a/sys-apps/hdparm/files/hdparm-init-7 b/sys-apps/hdparm/files/hdparm-init-7 index e503928b8449..de40beb6342a 100644 --- a/sys-apps/hdparm/files/hdparm-init-7 +++ b/sys-apps/hdparm/files/hdparm-init-7 @@ -25,23 +25,18 @@ depend() { } do_hdparm() { - if [[ ${args:=$all_args} ]] - then - orgdevice=`readlink -f $device` - if [ -b $orgdevice ]; then - ebegin "Running hdparm on $device" - hdparm $args $device > /dev/null || ewarn "Failed to run hdparm on $device" + if [[ ${args:=$all_args} ]] ; then + local orgdevice=$(readlink -f ${device}) + if [[ -b ${orgdevice} ]] ; then + ebegin "Running hdparm on ${device}" + hdparm ${args} ${device} > /dev/null + eend $? fi fi } start() { - ebegin 'Starting hdparm' - - which hdparm &>/dev/null - eend $? 'hdparm executable not found' - if [ -d /dev/ide ] then @@ -121,7 +116,8 @@ start() { do # check that the block device really exists # by opening it for reading - if [ -b $device ] && ( : <$device ) 2>/dev/null + local errmsg=$( : 2>/dev/null <$device ) + if [[ -b $device ]] && [[ $? == 0 || $(errmsg) == "*: No medium found" ]] then eval args=\${`basename $device`_args} do_hdparm diff --git a/sys-apps/hdparm/hdparm-6.3.ebuild b/sys-apps/hdparm/hdparm-6.3.ebuild new file mode 100644 index 000000000000..f066a19f5a5c --- /dev/null +++ b/sys-apps/hdparm/hdparm-6.3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-6.3.ebuild,v 1.1 2005/12/28 20:49:39 vapier Exp $ + +inherit toolchain-funcs + +DESCRIPTION="Utility to change hard drive performance parameters" +HOMEPAGE="http://sourceforge.net/projects/hdparm/" +SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="" + +src_unpack() { + unpack ${A} + cd ${S} + sed -i \ + -e "/^CFLAGS/ s:-O2:${CFLAGS}:" \ + -e "/^LDFLAGS/ s:-s:${LDFLAGS}:" \ + Makefile || die "sed" +} + +src_compile() { + emake CC="$(tc-getCC)" || die "compile error" +} + +src_install() { + into / + dosbin hdparm contrib/idectl || die "dosbin" + + newinitd ${FILESDIR}/hdparm-init-7 hdparm + newconfd ${FILESDIR}/hdparm-conf.d.3 hdparm + + doman hdparm.8 + dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig +} |