ChangeLog

# ChangeLog for app-laptop/hdapsd
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.9 2008/03/30 22:29:51 welp Exp $

*hdapsd-20060409-r2 (30 Mar 2008)

30 Mar 2008; Peter Weller +hdapsd-20060409-r2.ebuild:
Bump; bug 141565

*hdapsd-20060409-r1.ebuild (29 Aug 2007)
*hdapsd-20060409.ebuild (29 Aug 2007)

29 Aug 2007; Stefan Schweizer hdapsd-20060409.ebuild,
hdapsd-20060409-r1.ebuild:
Fix config checks, thanks jieryn in bug 190047

23 Jan 2007; Marius Mauch hdapsd-20060409.ebuild,
hdapsd-20060409-r1.ebuild:
Replacing einfo with elog

*hdapsd-20060409-r1 (05 Dec 2006)

05 Dec 2006; Roy Marples files/hdapsd.init,
+hdapsd-20060409-r1.ebuild:
Bump for a new patchset, works on 2.6.18 and 2.6.19 kernels.
Fixes #142376 and #148423

28 Jun 2006; Roy Marples hdapsd-20060409.ebuild:
Remove syslog stuff as it was invalid for scsi/sata systems.
Detect patched kernel via /sys in pkg_postinst as kernel sources may not be
installed and the warning may be in error.

27 Jun 2006; Roy Marples +files/hdaps-Z60m.patch,
hdapsd-20060409.ebuild:
Added a kernel patch so --config can enable hdaps on my Z60m

*hdapsd-20060409 (26 Jun 2006)

26 Jun 2006; Roy Marples +files/hdapsd.conf,
+files/hdapsd.init, +metadata.xml, +hdapsd-20060409.ebuild:
Initial import based on the work by Michael Gaber and Jeff Grafton, #119845.

Manifest

AUX hdaps-Z60m.patch 352 RMD160 963be45785af235fa3e0d74d68d2e75fad663396 SHA1 317de158fdacdd379a94b0652b54ed48525a71bc SHA256 05b0def085f637bae8561a825d7ff3ffc51bdd33609b1520e2d30aa807f00016
AUX hdapsd.conf 321 RMD160 5bb760d34bca3f5a12aeb057b78de7e2a9065bc3 SHA1 ade013dab6278a385b4658aad7e871b743380689 SHA256 22e1acf385427052a12858db005fd73d42d9f6818fb253b032cd326101df2e34
AUX hdapsd.init 1267 RMD160 1ae521bcf38ace4904d97d64eedb4d72eaaffa23 SHA1 24bd54b9a322dcfc0c54d82093160a1965a8e118 SHA256 3555618d1613c3d60d5164b9f9e70fd7ac1ccf6f6b1f30d53aac33a901487964
DIST hdaps_protect-patches-1.tar.bz2 6179 RMD160 5b173034eebbbee598e01d45e5e76e2859c0a829 SHA1 7d79652ddc884b6619944a0d9ed70557e9c56779 SHA256 ab4192fa3a26497fe9fed63bfaedfebc74d288a85e7283b1bc338984be1133dd
DIST hdaps_protect-patches-2.tar.bz2 10203 RMD160 899a109b58b7aa4949012cd447275d2f3957951e SHA1 67599f3c1a5daaa298f6f1d30168ab0f6c45f407 SHA256 59cfe2535f3d11d1fe54d3c6acb3d2471c461af7770816aeec02411566d38c4b
DIST hdapsd-20060409.c.bz2 5253 RMD160 0b8d07a2612bd4888014913bd8810de664352bfb SHA1 df6c5bf28d4539e97bb1800a455a36cf690d4779 SHA256 e8e1788d485814cd294c33744b60265423d8971abf5ab50b037f05de2c710a21
EBUILD hdapsd-20060409-r1.ebuild 2337 RMD160 57a84e5ae4a52e5a16b93d150e72e16a2b32d527 SHA1 887efe8ff8fc621b78b03411da046289b2350d3c SHA256 c8f46876dea82c1949afde90b75168929883e23cd8e6ebc8a2736e05e66d66de
EBUILD hdapsd-20060409-r2.ebuild 2776 RMD160 0e67e49a51fbb6136880dad074ebe7a19a7b5fc0 SHA1 96983d5ab34d06510153e52c2e0299528ba50ea0 SHA256 786e58a3b6a96645c9bd28f3ca5b1b28e9f6055d9568726c4dc628406dd2819e
EBUILD hdapsd-20060409.ebuild 2331 RMD160 fa88c5443c1a70529aa8864492ff204164f77843 SHA1 202aace98040253e0acbafe2949b58532888f73a SHA256 87169b8630e5b0fac52eea0096086cae1c6e820b41428971da9c4ec3d2d0a184
MISC ChangeLog 1610 RMD160 861b44737eefd461901888f79add304bbf5f21e2 SHA1 79f44c084f19a265a382936acbdafeb5eed68448 SHA256 97e593d7cd7a1ffba322181b0006823696cf59fe1a30475f2d99319f7f220c67
MISC metadata.xml 263 RMD160 97c8ad544063bcbdf65190404934923e0a42d562 SHA1 6e276e4277eeae8ee686d0c858761aa63bf71e0b SHA256 0d5fcdbefefdc4a8d5d703b5a01a74e1bcf181cb3bd29fd82e202221795e51c2

files

hdapsd-20060409-r1.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/hdapsd-20060409-r1.ebuild,v 1.3 2007/08/29 18:55:52 genstef Exp $

inherit eutils linux-info

PROTECT_VER="2"

DESCRIPTION="IBM ThinkPad Harddrive Active Protection disk head parking daemon"
HOMEPAGE="http://hdaps.sourceforge.net/"
SRC_URI="mirror://gentoo/${P}.c.bz2
mirror://gentoo/hdaps_protect-patches-${PROTECT_VER}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

IUSE=""
RDEPEND=""

S="${WORKDIR}"

CONFIG_CHECK="SENSORS_HDAPS"
ERROR_SENSORS_HDAPS="${P} requires support for HDAPS (CONFIG_SENSORS_HDAPS)"

src_compile() {
cd "${WORKDIR}"
gcc ${CFLAGS} "${P}".c -o hdapsd || die "failed to compile"
}

src_install() {
dosbin "${WORKDIR}"/hdapsd
newconfd "${FILESDIR}"/hdapsd.conf hdapsd
newinitd "${FILESDIR}"/hdapsd.init hdapsd

# Install our kernel patches
dodoc *.patch "${FILESDIR}"/hdaps-Z60m.patch
}

# Yes, this sucks as the source location may change, kernel sources may not be
# installed, but we try our best anyway
kernel_patched() {
get_version

if grep -qs "blk_protect_register" "${KERNEL_DIR}"/block/ll_rw_blk.c ; then
einfo "Your kernel has already been patched for blk_freeze"
return 0
fi

return 1
}

pkg_config() {
kernel_patched && return 0

local docdir="${ROOT}/usr/share/doc/${PF}/"
local p="hdaps_protect-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.patch.gz"

# We need to find our FILESDIR as it's now lost
if [[ ! -e ${docdir}/${p} ]] ; then
eerror "We don't have a patch for kernel ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} yet"
return 1
fi

if [[ ! -d ${KERNEL_DIR} ]] ; then
eerror "Kernel sources not found!"
return 1
fi

cd "${KERNEL_DIR}"
epatch "${docdir}/${p}"

# This is just a nice to have for me as I use a Z60m myself
if ! grep -q "Z60m" "${KERNEL_DIR}"/drivers/hwmon/hdaps.c ; then
epatch "${docdir}"/hdaps-Z60m.patch.gz
fi

echo
einfo "Now you should rebuild your kernel, its modules"
einfo "and then install them."
}

pkg_postinst(){
[[ -n $(ls "${ROOT}"/sys/block/*/queue/protect 2>/dev/null) ]] && return 0

if ! kernel_patched ; then
ewarn "Your kernel has NOT been patched for blk_freeze"
elog "The ebuild can attempt to patch your kernel like so"
elog " emerge --config =${PF}"
fi
}

hdapsd-20060409-r2.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/hdapsd-20060409-r2.ebuild,v 1.1 2008/03/30 22:29:51 welp Exp $

inherit eutils linux-info

PROTECT_VER="2"

DESCRIPTION="IBM ThinkPad Harddrive Active Protection disk head parking daemon"
HOMEPAGE="http://hdaps.sourceforge.net/"
SRC_URI="mirror://gentoo/${P}.c.bz2
mirror://gentoo/hdaps_protect-patches-${PROTECT_VER}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

IUSE=""
RDEPEND=""

S="${WORKDIR}"

src_compile() {
# We require the hdaps module; problem is that it can come from either
# kernel sources or from the tp_smapi package. This hack is required because
# the linux-info eclass doesn't export any more suitable config checkers.
# Here we just skip calling its pkg_setup() in case the module is provided
# by the package.

if ! has_version app-laptop/tp_smapi || ! built_with_use app-laptop/tp_smapi hdaps; then
CONFIG_CHECK="SENSORS_HDAPS"
ERROR_SENSORS_HDAPS="${P} requires support for HDAPS (CONFIG_SENSORS_HDAPS)"
linux-info_pkg_setup
fi

cd "${WORKDIR}"
gcc ${CFLAGS} "${P}".c -o hdapsd || die "failed to compile"
}

src_install() {
dosbin "${WORKDIR}"/hdapsd
newconfd "${FILESDIR}"/hdapsd.conf hdapsd
newinitd "${FILESDIR}"/hdapsd.init hdapsd

# Install our kernel patches
dodoc *.patch "${FILESDIR}"/hdaps-Z60m.patch
}

# Yes, this sucks as the source location may change, kernel sources may not be
# installed, but we try our best anyway
kernel_patched() {
get_version

if grep -qs "blk_protect_register" "${KERNEL_DIR}"/block/ll_rw_blk.c ; then
einfo "Your kernel has already been patched for blk_freeze"
return 0
fi

return 1
}

pkg_config() {
kernel_patched && return 0

local docdir="${ROOT}/usr/share/doc/${PF}/"
local p="hdaps_protect-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.patch.gz"

# We need to find our FILESDIR as it's now lost
if [[ ! -e ${docdir}/${p} ]] ; then
eerror "We don't have a patch for kernel ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} yet"
return 1
fi

if [[ ! -d ${KERNEL_DIR} ]] ; then
eerror "Kernel sources not found!"
return 1
fi

cd "${KERNEL_DIR}"
epatch "${docdir}/${p}"

# This is just a nice to have for me as I use a Z60m myself
if ! grep -q "Z60m" "${KERNEL_DIR}"/drivers/hwmon/hdaps.c ; then
epatch "${docdir}"/hdaps-Z60m.patch.gz
fi

echo
einfo "Now you should rebuild your kernel, its modules"
einfo "and then install them."
}

pkg_postinst(){
[[ -n $(ls "${ROOT}"/sys/block/*/queue/protect 2>/dev/null) ]] && return 0

if ! kernel_patched ; then
ewarn "Your kernel has NOT been patched for blk_freeze"
elog "The ebuild can attempt to patch your kernel like so"
elog " emerge --config =${PF}"
fi
}

hdapsd-20060409.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/hdapsd-20060409.ebuild,v 1.5 2007/08/29 18:55:52 genstef Exp $

inherit eutils linux-info

PROTECT_VER="1"

DESCRIPTION="IBM ThinkPad Harddrive Active Protection disk head parking daemon"
HOMEPAGE="http://hdaps.sourceforge.net/"
SRC_URI="mirror://gentoo/${P}.c.bz2
mirror://gentoo/hdaps_protect-patches-${PROTECT_VER}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

IUSE=""
RDEPEND=""

S="${WORKDIR}"

CONFIG_CHECK="SENSORS_HDAPS"
ERROR_SENSORS_HDAPS="${P} requires support for HDAPS (CONFIG_SENSORS_HDAPS)"

src_compile() {
cd "${WORKDIR}"
gcc ${CFLAGS} "${P}".c -o hdapsd || die "failed to compile"
}

src_install() {
dosbin "${WORKDIR}"/hdapsd
newconfd "${FILESDIR}"/hdapsd.conf hdapsd
newinitd "${FILESDIR}"/hdapsd.init hdapsd

# Install our kernel patches
dodoc *.patch "${FILESDIR}"/hdaps-Z60m.patch
}

# Yes, this sucks as the source location may change, kernel sources may not be
# installed, but we try our best anyway
kernel_patched() {
get_version

if grep -qs "blk_protect_register" "${KERNEL_DIR}"/block/ll_rw_blk.c ; then
einfo "Your kernel has already been patched for blk_freeze"
return 0
fi

return 1
}

pkg_config() {
kernel_patched && return 0

local docdir="${ROOT}/usr/share/doc/${PF}/"
local p="hdaps_protect-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.patch.gz"

# We need to find our FILESDIR as it's now lost
if [[ ! -e ${docdir}/${p} ]] ; then
eerror "We don't have a patch for kernel ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} yet"
return 1
fi

if [[ ! -d ${KERNEL_DIR} ]] ; then
eerror "Kernel sources not found!"
return 1
fi

cd "${KERNEL_DIR}"
epatch "${docdir}/${p}"

# This is just a nice to have for me as I use a Z60m myself
if ! grep "Z60m" "${KERNEL_DIR}"/drivers/hwmon/hdaps.c ; then
epatch "${docdir}"/hdaps-Z60m.patch.gz
fi

echo
einfo "Now you should rebuild your kernel, its modules"
einfo "and then install them."
}

pkg_postinst(){
[[ -n $(ls "${ROOT}"/sys/block/*/queue/protect 2>/dev/null) ]] && return 0

if ! kernel_patched ; then
ewarn "Your kernel has NOT been patched for blk_freeze"
elog "The ebuild can attempt to patch your kernel like so"
elog " emerge --config =${PF}"
fi
}

metadata.xml




mobile
IBM ThinkPad Harddrive Active Protection disk head parking
daemon