summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Weller <welp@gentoo.org>2008-03-30 22:29:51 +0000
committerPeter Weller <welp@gentoo.org>2008-03-30 22:29:51 +0000
commit2a143b495d04fdb2c6e2c4ebe04b3622b21c09c1 (patch)
tree5e773f708d7f1a23d6cbfbdcc26bb60cf9eb4715 /app-laptop
parentStable for HPPA (bug #215485). (diff)
downloadhistorical-2a143b495d04fdb2c6e2c4ebe04b3622b21c09c1.tar.gz
historical-2a143b495d04fdb2c6e2c4ebe04b3622b21c09c1.tar.bz2
historical-2a143b495d04fdb2c6e2c4ebe04b3622b21c09c1.zip
Bump; bug 141565
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/hdapsd/ChangeLog9
-rw-r--r--app-laptop/hdapsd/Manifest13
-rw-r--r--app-laptop/hdapsd/hdapsd-20060409-r2.ebuild100
3 files changed, 109 insertions, 13 deletions
diff --git a/app-laptop/hdapsd/ChangeLog b/app-laptop/hdapsd/ChangeLog
index 8cbc3299392d..27f0ac97e06d 100644
--- a/app-laptop/hdapsd/ChangeLog
+++ b/app-laptop/hdapsd/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-laptop/hdapsd
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.8 2008/03/17 16:20:39 chainsaw Exp $
+# 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 <welp@gentoo.org> +hdapsd-20060409-r2.ebuild:
+ Bump; bug 141565
*hdapsd-20060409-r1.ebuild (29 Aug 2007)
*hdapsd-20060409.ebuild (29 Aug 2007)
diff --git a/app-laptop/hdapsd/Manifest b/app-laptop/hdapsd/Manifest
index abf0a5f2fc8b..2f09cf97a243 100644
--- a/app-laptop/hdapsd/Manifest
+++ b/app-laptop/hdapsd/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
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
@@ -8,13 +5,7 @@ DIST hdaps_protect-patches-1.tar.bz2 6179 RMD160 5b173034eebbbee598e01d45e5e76e2
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 1485 RMD160 b4f1689e08e16950b0a635e2a7b9044558a1f310 SHA1 9a83825e15b3d8496f2ea7deced879184f9b5a1f SHA256 fbb61a6dd2e8b5ba056c9a2417a011e7cf91955c590c01ce068cf878e9dbc00f
+MISC ChangeLog 1610 RMD160 861b44737eefd461901888f79add304bbf5f21e2 SHA1 79f44c084f19a265a382936acbdafeb5eed68448 SHA256 97e593d7cd7a1ffba322181b0006823696cf59fe1a30475f2d99319f7f220c67
MISC metadata.xml 263 RMD160 97c8ad544063bcbdf65190404934923e0a42d562 SHA1 6e276e4277eeae8ee686d0c858761aa63bf71e0b SHA256 0d5fcdbefefdc4a8d5d703b5a01a74e1bcf181cb3bd29fd82e202221795e51c2
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.7 (GNU/Linux)
-
-iD8DBQFH3poWp5vW4rUFj5oRAkA3AKCRaS0kWFv4kEDzfzohO3gE2rV2qgCeLAok
-KoH2oRZgFZpC41N6ZgRI6zY=
-=4qHs
------END PGP SIGNATURE-----
diff --git a/app-laptop/hdapsd/hdapsd-20060409-r2.ebuild b/app-laptop/hdapsd/hdapsd-20060409-r2.ebuild
new file mode 100644
index 000000000000..c56c05a5071d
--- /dev/null
+++ b/app-laptop/hdapsd/hdapsd-20060409-r2.ebuild
@@ -0,0 +1,100 @@
+# 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
+}