1 |
aidecoe 14/04/27 11:11:29 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: hddtemp-0.3_beta15-r25.ebuild |
5 |
Log: |
6 |
Merged r7 and r24 database update approach into a single ebuild. |
7 |
|
8 |
Bumped to EAPI 5, btw. |
9 |
|
10 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key F0134531E1DBFAB5) |
11 |
|
12 |
Revision Changes Path |
13 |
1.154 app-admin/hddtemp/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?rev=1.154&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?rev=1.154&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?r1=1.153&r2=1.154 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v |
22 |
retrieving revision 1.153 |
23 |
retrieving revision 1.154 |
24 |
diff -u -r1.153 -r1.154 |
25 |
--- ChangeLog 27 Apr 2014 11:00:47 -0000 1.153 |
26 |
+++ ChangeLog 27 Apr 2014 11:11:29 -0000 1.154 |
27 |
@@ -1,6 +1,14 @@ |
28 |
# ChangeLog for app-admin/hddtemp |
29 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.153 2014/04/27 11:00:47 aidecoe Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.154 2014/04/27 11:11:29 aidecoe Exp $ |
32 |
+ |
33 |
+*hddtemp-0.3_beta15-r25 (27 Apr 2014) |
34 |
+ |
35 |
+ 27 Apr 2014; Amadeusz Żołnowski <aidecoe@g.o> |
36 |
+ +hddtemp-0.3_beta15-r25.ebuild: |
37 |
+ Merged r7 and r24 database update approach into a single ebuild. |
38 |
+ |
39 |
+ Bumped to EAPI 5, btw. |
40 |
|
41 |
27 Apr 2014; Amadeusz Żołnowski <aidecoe@g.o> |
42 |
-hddtemp-0.3_beta15-r3.ebuild, -hddtemp-0.3_beta15-r5.ebuild, |
43 |
|
44 |
|
45 |
|
46 |
1.1 app-admin/hddtemp/hddtemp-0.3_beta15-r25.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r25.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r25.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: hddtemp-0.3_beta15-r25.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2014 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r25.ebuild,v 1.1 2014/04/27 11:11:29 aidecoe Exp $ |
56 |
|
57 |
EAPI=5 |
58 |
|
59 |
inherit eutils autotools systemd |
60 |
|
61 |
MY_P=${P/_beta/-beta} |
62 |
DBV=20080531 |
63 |
|
64 |
DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives" |
65 |
HOMEPAGE="http://savannah.nongnu.org/projects/hddtemp/" |
66 |
SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirror://gentoo/hddtemp-${DBV}.db.bz2" |
67 |
|
68 |
LICENSE="GPL-2" |
69 |
SLOT="0" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86" |
71 |
IUSE="network-cron nls" |
72 |
|
73 |
DEPEND="" |
74 |
RDEPEND="${DEPEND}" |
75 |
|
76 |
S="${WORKDIR}/${MY_P}" |
77 |
|
78 |
DOCS=(README TODO ChangeLog) |
79 |
|
80 |
src_prepare() { |
81 |
epatch "${FILESDIR}"/${P}-satacmds.patch |
82 |
epatch "${FILESDIR}"/${P}-byteswap.patch |
83 |
epatch "${FILESDIR}"/${P}-execinfo.patch |
84 |
epatch "${FILESDIR}"/${P}-nls.patch |
85 |
epatch "${FILESDIR}"/${P}-iconv.patch |
86 |
epatch "${FILESDIR}"/${P}-dontwake.patch |
87 |
AT_M4DIR="m4" eautoreconf |
88 |
} |
89 |
|
90 |
src_configure() { |
91 |
local myconf |
92 |
|
93 |
myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db" |
94 |
# disabling nls breaks compiling |
95 |
use nls || myconf="--disable-nls ${myconf}" |
96 |
econf ${myconf} |
97 |
} |
98 |
|
99 |
src_install() { |
100 |
default |
101 |
|
102 |
insinto /usr/share/hddtemp |
103 |
newins "${WORKDIR}/hddtemp-${DBV}.db" hddtemp.db |
104 |
doins "${FILESDIR}"/hddgentoo.db |
105 |
|
106 |
update_db "${D}/usr/share/hddtemp/hddgentoo.db" "${D}/usr/share/hddtemp/hddtemp.db" |
107 |
newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp |
108 |
newinitd "${FILESDIR}"/hddtemp-init hddtemp |
109 |
systemd_newunit "${FILESDIR}"/hddtemp.service-r1 "${PN}.service" |
110 |
systemd_install_serviced "${FILESDIR}"/hddtemp.service.conf |
111 |
|
112 |
if use network-cron; then |
113 |
dosbin "${FILESDIR}"/update-hddtemp.db |
114 |
exeinto /etc/cron.monthly |
115 |
echo -e "#!/bin/sh\n/usr/sbin/update-hddtemp.db" > "${T}"/hddtemp.cron |
116 |
newexe "${T}"/hddtemp.cron update-hddtemp.db |
117 |
fi |
118 |
} |
119 |
|
120 |
pkg_postinst() { |
121 |
elog "In order to update your hddtemp database, run:" |
122 |
if use network-cron; then |
123 |
elog " update-hddtemp.db" |
124 |
else |
125 |
elog " emerge --config =${CATEGORY}/${PF}" |
126 |
fi |
127 |
elog "" |
128 |
elog "If your hard drive is not recognized by hddtemp, please consider" |
129 |
elog "submitting your HDD info for inclusion into the Gentoo hddtemp" |
130 |
elog "database by filing a bug at https://bugs.gentoo.org/" |
131 |
echo |
132 |
ewarn "If hddtemp complains but finds your HDD temperature sensor, use the" |
133 |
ewarn "--quiet option to suppress the warning." |
134 |
} |
135 |
|
136 |
update_db() { |
137 |
local src=$1 |
138 |
local dst=$2 |
139 |
|
140 |
while read line ; do |
141 |
if [[ -z $(echo "${line}" | sed -re 's/(^#.*|^\w*$)//') ]]; then |
142 |
echo "${line}" >> "${dst}" |
143 |
fi |
144 |
|
145 |
id=$(echo "${line}" | grep -o '"[^"]*"') |
146 |
|
147 |
grep "${id}" "${dst}" 2>&1 >/dev/null || echo "${line}" >> "${dst}" |
148 |
done < "${src}" |
149 |
} |
150 |
|
151 |
pkg_config() { |
152 |
cd "${ROOT}"/usr/share/hddtemp || die |
153 |
|
154 |
einfo "Trying to download the latest hddtemp.db file" |
155 |
wget http://www.guzu.net/linux/hddtemp.db -O hddtemp.db \ |
156 |
|| die "failed to download hddtemp.db" |
157 |
|
158 |
update_db "hddgentoo.db" "hddtemp.db" |
159 |
} |