summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Piotr Żołnowski <aidecoe@gentoo.org>2013-07-06 19:48:55 +0000
committerAmadeusz Piotr Żołnowski <aidecoe@gentoo.org>2013-07-06 19:48:55 +0000
commitf49c4faa967e0278c1491f91386985b5437f730b (patch)
treede9b837a139f1ad9eb2954db1d7b2b23072823d3 /app-admin/hddtemp
parentadded prefix keywords (diff)
downloadgentoo-2-f49c4faa967e0278c1491f91386985b5437f730b.tar.gz
gentoo-2-f49c4faa967e0278c1491f91386985b5437f730b.tar.bz2
gentoo-2-f49c4faa967e0278c1491f91386985b5437f730b.zip
Added systemd unit file (by Pacho Ramos <pacho@gentoo.org>)
- fixes bug #474458. Removed 'nls' flag from IUSE, because it doesn't build if disabled - fixes bug #457648. Added WDC WD3200BEKT-75A25T0 and Hitachi HTS542512K9SA00 to hddgentoo.db - fixes bug #470970 and bug #473686. (Portage version: 2.1.12.11/cvs/Linux x86_64, signed Manifest commit with key F0134531E1DBFAB5)
Diffstat (limited to 'app-admin/hddtemp')
-rw-r--r--app-admin/hddtemp/ChangeLog18
-rw-r--r--app-admin/hddtemp/files/hddgentoo.db2
-rw-r--r--app-admin/hddtemp/files/hddtemp.service11
-rw-r--r--app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild8
-rw-r--r--app-admin/hddtemp/hddtemp-0.3_beta15-r23.ebuild91
-rw-r--r--app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild8
-rw-r--r--app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild8
-rw-r--r--app-admin/hddtemp/hddtemp-0.3_beta15-r6.ebuild93
8 files changed, 223 insertions, 16 deletions
diff --git a/app-admin/hddtemp/ChangeLog b/app-admin/hddtemp/ChangeLog
index c0ef06f2f0f1..c668c6fbc78b 100644
--- a/app-admin/hddtemp/ChangeLog
+++ b/app-admin/hddtemp/ChangeLog
@@ -1,6 +1,22 @@
# ChangeLog for app-admin/hddtemp
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.126 2013/05/21 18:47:52 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.127 2013/07/06 19:48:55 aidecoe Exp $
+
+*hddtemp-0.3_beta15-r23 (06 Jul 2013)
+*hddtemp-0.3_beta15-r6 (06 Jul 2013)
+
+ 06 Jul 2013; Amadeusz Żołnowski <aidecoe@gentoo.org>
+ hddtemp-0.3_beta15-r3.ebuild, hddtemp-0.3_beta15-r5.ebuild,
+ +hddtemp-0.3_beta15-r6.ebuild, hddtemp-0.3_beta15-r22.ebuild,
+ +hddtemp-0.3_beta15-r23.ebuild, files/hddgentoo.db, +files/hddtemp.service:
+ Added systemd unit file (by Pacho Ramos <pacho@gentoo.org>)
+ - fixes bug #474458.
+
+ Removed 'nls' flag from IUSE, because it doesn't build if disabled
+ - fixes bug #457648.
+
+ Added WDC WD3200BEKT-75A25T0 and Hitachi HTS542512K9SA00 to hddgentoo.db
+ - fixes bug #470970 and bug #473686.
21 May 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> files/hddgentoo.db:
Added new drives to hddgentoo.db. Fixes bug #467046 and bug #468816.
diff --git a/app-admin/hddtemp/files/hddgentoo.db b/app-admin/hddtemp/files/hddgentoo.db
index 7e6b71c50da8..bbe17705fcdb 100644
--- a/app-admin/hddtemp/files/hddgentoo.db
+++ b/app-admin/hddtemp/files/hddgentoo.db
@@ -66,6 +66,7 @@
"WDC WD10EADS-00M2B0" 194 C "Western Digital Caviar Green 1TB SATA2 5400RPM 32MB"
"WDC WD20EARS-00S8B1" 194 C "Western Digital Caviar Green 2TB SATA2 IntelliPower 64MB"
"WDC WD3200BEKT-00F3T0" 194 C "Western Digital Scorpio Black 320GB SATA2 7200RPM 16MB"
+"WDC WD3200BEKT-75A25T0" 194 C "Western Digital Scorpio Black 320GB SATA2 7200RPM 16MB"
"WDC WD5000AADS" 194 C "Western Digital Caviar Green 500GB SATA2 IntelliPower 32MB"
"WDC WD7500AARX" 194 C "Western Digital Caviar Green 750GB SATA3 IntelliPower 64MB"
"WDC WD3200AZDX" 194 C "Western Digital Caviar Green 320GB SATA3 IntelliPower 32MB"
@@ -186,6 +187,7 @@
"TOSHIBA MK3252GSX" 194 C "Toshiba MK3252GSX"
"SAMSUNG HM160HC" 194 C "Samsung HM160HC"
+"Hitachi HTS542512K9SA00" 194 C "Hitachi Travelstar 5K250 120GB SATA2 5400RPM 8MB"
"Hitachi HTS542516K9SA00" 194 C "Hitachi Travelstar 5K250 160GB SATA2 5400RPM 8MB"
"Hitachi HDS721680PLA380" 194 C "Hitachi Deskstar 7K160 80GB SATA2 7200RPM 8MB"
"ST9120822AS" 194 C "Seagate Momentus 5400.3 120GB SATA 5400RPM 8MB"
diff --git a/app-admin/hddtemp/files/hddtemp.service b/app-admin/hddtemp/files/hddtemp.service
new file mode 100644
index 000000000000..b2fca4214bca
--- /dev/null
+++ b/app-admin/hddtemp/files/hddtemp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Hard drive temperature monitor daemon
+Documentation=man:hddtemp(8)
+
+[Service]
+Environment=HDDTEMP_OPTIONS=--listen=127.0.0.1
+EnvironmentFile=-/etc/conf.d/hddtemp
+ExecStart=/usr/sbin/hddtemp -d $HDDTEMP_OPTIONS $HDDTEMP_DRIVES
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild
index d8c90f2d62ca..180994906266 100644
--- a/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild,v 1.2 2012/10/27 12:14:08 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r22.ebuild,v 1.3 2013/07/06 19:48:55 aidecoe Exp $
EAPI=4
@@ -16,7 +16,7 @@ SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirro
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
-IUSE="network-cron nls"
+IUSE="network-cron"
DEPEND=""
RDEPEND="${DEPEND}"
@@ -39,8 +39,6 @@ src_configure() {
local myconf
myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
- # disabling nls breaks compiling
- use nls || myconf="--disable-nls ${myconf}"
econf ${myconf}
}
diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r23.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r23.ebuild
new file mode 100644
index 000000000000..296f2c5e6024
--- /dev/null
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r23.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r23.ebuild,v 1.1 2013/07/06 19:48:55 aidecoe Exp $
+
+EAPI=4
+
+inherit eutils autotools systemd
+
+MY_P=${P/_beta/-beta}
+DBV=20080531
+
+DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives"
+HOMEPAGE="http://savannah.nongnu.org/projects/hddtemp/"
+SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirror://gentoo/hddtemp-${DBV}.db.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
+IUSE="network-cron"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=(README TODO ChangeLog)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-satacmds.patch
+ epatch "${FILESDIR}"/${P}-byteswap.patch
+ epatch "${FILESDIR}"/${P}-execinfo.patch
+ epatch "${FILESDIR}"/${P}-nls.patch
+ epatch "${FILESDIR}"/${P}-iconv.patch
+ epatch "${FILESDIR}"/${P}-dontwake.patch
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/hddtemp
+ newins "${WORKDIR}/hddtemp-${DBV}.db" hddtemp.db
+ doins "${FILESDIR}"/hddgentoo.db
+
+ update_db "${D}/usr/share/hddtemp/hddgentoo.db" "${D}/usr/share/hddtemp/hddtemp.db"
+ newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp
+ newinitd "${FILESDIR}"/hddtemp-init hddtemp
+ systemd_dounit "${FILESDIR}"/hddtemp.service
+
+ dosbin "${FILESDIR}"/update-hddtemp.db
+
+ if use network-cron ; then
+ exeinto /etc/cron.monthly
+ echo -e "#!/bin/sh\n/usr/sbin/update-hddtemp.db" > "${T}"/hddtemp.cron
+ newexe "${T}"/hddtemp.cron update-hddtemp.db
+ fi
+}
+
+pkg_postinst() {
+ elog "In order to update your hddtemp database, run:"
+ elog " update-hddtemp.db"
+ elog ""
+ elog "If your hard drive is not recognized by hddtemp, please consider"
+ elog "submitting your HDD info for inclusion into the Gentoo hddtemp"
+ elog "database by filing a bug at https://bugs.gentoo.org/"
+ echo
+ ewarn "If hddtemp complains but finds your HDD temperature sensor, use the"
+ ewarn "--quiet option to suppress the warning."
+}
+
+update_db() {
+ local src=$1
+ local dst=$2
+
+ while read line ; do
+ if [[ -z $(echo "${line}" | sed -re 's/(^#.*|^\w*$)//') ]]; then
+ echo "${line}" >> "${dst}"
+ fi
+
+ id=$(echo "${line}" | grep -o '"[^"]*"')
+
+ grep "${id}" "${dst}" 2>&1 >/dev/null || echo "${line}" >> "${dst}"
+ done < "${src}"
+}
diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild
index dfe3ec34ae87..fe4d6922230f 100644
--- a/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild,v 1.12 2011/11/14 12:25:25 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r3.ebuild,v 1.13 2013/07/06 19:48:55 aidecoe Exp $
inherit eutils autotools
@@ -14,7 +14,7 @@ SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirro
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ppc sparc x86"
-IUSE="nls"
+IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
@@ -36,8 +36,6 @@ src_compile() {
local myconf
myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
- # disabling nls breaks compiling
- use nls || myconf="--disable-nls ${myconf}"
econf ${myconf} || die
emake || die
}
diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild
index 306a212cf024..057b7fbfae64 100644
--- a/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild,v 1.2 2012/10/27 12:14:08 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r5.ebuild,v 1.3 2013/07/06 19:48:55 aidecoe Exp $
inherit eutils autotools
@@ -14,7 +14,7 @@ SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirro
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
-IUSE="nls"
+IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
@@ -37,8 +37,6 @@ src_compile() {
local myconf
myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
- # disabling nls breaks compiling
- use nls || myconf="--disable-nls ${myconf}"
econf ${myconf} || die
emake || die
}
diff --git a/app-admin/hddtemp/hddtemp-0.3_beta15-r6.ebuild b/app-admin/hddtemp/hddtemp-0.3_beta15-r6.ebuild
new file mode 100644
index 000000000000..752b4d98d83d
--- /dev/null
+++ b/app-admin/hddtemp/hddtemp-0.3_beta15-r6.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r6.ebuild,v 1.1 2013/07/06 19:48:55 aidecoe Exp $
+
+inherit eutils autotools systemd
+
+MY_P=${P/_beta/-beta}
+DBV=20080531
+
+DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives"
+HOMEPAGE="http://savannah.nongnu.org/projects/hddtemp/"
+SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirror://gentoo/hddtemp-${DBV}.db.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-satacmds.patch
+ epatch "${FILESDIR}"/${P}-byteswap.patch
+ epatch "${FILESDIR}"/${P}-execinfo.patch
+ epatch "${FILESDIR}"/${P}-nls.patch
+ epatch "${FILESDIR}"/${P}-iconv.patch
+ epatch "${FILESDIR}"/${P}-dontwake.patch
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc README TODO ChangeLog
+
+ insinto /usr/share/hddtemp
+ newins "${WORKDIR}/hddtemp-${DBV}.db" hddtemp.db
+ doins "${FILESDIR}"/hddgentoo.db
+
+ update_db "${D}/usr/share/hddtemp/hddgentoo.db" "${D}/usr/share/hddtemp/hddtemp.db"
+ newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp
+ newinitd "${FILESDIR}"/hddtemp-init hddtemp
+ systemd_dounit "${FILESDIR}"/hddtemp.service
+}
+
+pkg_postinst() {
+ elog "In order to update your hddtemp database, run:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog ""
+ elog "If your hard drive is not recognized by hddtemp, please consider"
+ elog "submitting your HDD info for inclusion into the Gentoo hddtemp"
+ elog "database by filing a bug at https://bugs.gentoo.org/"
+ echo
+ ewarn "If hddtemp complains but finds your HDD temperature sensor, use the"
+ ewarn "--quiet option to suppress the warning."
+}
+
+update_db() {
+ local src=$1
+ local dst=$2
+
+ while read line ; do
+ if [[ -z $(echo "${line}" | sed -re 's/(^#.*|^\w*$)//') ]]; then
+ echo "${line}" >> "${dst}"
+ fi
+
+ id=$(echo "${line}" | grep -o '"[^"]*"')
+
+ grep "${id}" "${dst}" 2>&1 >/dev/null || echo "${line}" >> "${dst}"
+ done < "${src}"
+}
+
+pkg_config() {
+ cd "${ROOT}"/usr/share/hddtemp
+
+ einfo "Trying to download the latest hddtemp.db file"
+ wget http://www.guzu.net/linux/hddtemp.db -O hddtemp.db \
+ || die "failed to download hddtemp.db"
+
+ update_db "hddgentoo.db" "hddtemp.db"
+}