Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/hddtemp: hddtemp-0.3_beta15-r24.ebuild hddtemp-0.3_beta15-r7.ebuild ChangeLog
Date: Sat, 28 Sep 2013 08:09:07
Message-Id: 20130928080902.5D51A2004C@flycatcher.gentoo.org
1 pacho 13/09/28 08:09:02
2
3 Modified: ChangeLog
4 Added: hddtemp-0.3_beta15-r24.ebuild
5 hddtemp-0.3_beta15-r7.ebuild
6 Log:
7 Fix unit file (#485924 by Tilo Prütz)
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
10
11 Revision Changes Path
12 1.138 app-admin/hddtemp/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?rev=1.138&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?rev=1.138&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/ChangeLog?r1=1.137&r2=1.138
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v
21 retrieving revision 1.137
22 retrieving revision 1.138
23 diff -u -r1.137 -r1.138
24 --- ChangeLog 6 Sep 2013 18:33:17 -0000 1.137
25 +++ ChangeLog 28 Sep 2013 08:09:02 -0000 1.138
26 @@ -1,6 +1,14 @@
27 # ChangeLog for app-admin/hddtemp
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.137 2013/09/06 18:33:17 ago Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/ChangeLog,v 1.138 2013/09/28 08:09:02 pacho Exp $
31 +
32 +*hddtemp-0.3_beta15-r24 (28 Sep 2013)
33 +*hddtemp-0.3_beta15-r7 (28 Sep 2013)
34 +
35 + 28 Sep 2013; Pacho Ramos <pacho@g.o> +files/hddtemp.service-r1,
36 + +files/hddtemp.service.conf, +hddtemp-0.3_beta15-r24.ebuild,
37 + +hddtemp-0.3_beta15-r7.ebuild:
38 + Fix unit file (#485924 by Tilo Prütz)
39
40 06 Sep 2013; Agostino Sarubbo <ago@g.o> hddtemp-0.3_beta15-r6.ebuild:
41 Stable for sparc, wrt bug #480036
42
43
44
45 1.1 app-admin/hddtemp/hddtemp-0.3_beta15-r24.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r24.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r24.ebuild?rev=1.1&content-type=text/plain
49
50 Index: hddtemp-0.3_beta15-r24.ebuild
51 ===================================================================
52 # Copyright 1999-2013 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r24.ebuild,v 1.1 2013/09/28 08:09:02 pacho Exp $
55
56 EAPI=4
57
58 inherit eutils autotools systemd
59
60 MY_P=${P/_beta/-beta}
61 DBV=20080531
62
63 DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives"
64 HOMEPAGE="http://savannah.nongnu.org/projects/hddtemp/"
65 SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirror://gentoo/hddtemp-${DBV}.db.bz2"
66
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
70 IUSE="network-cron nls"
71
72 DEPEND=""
73 RDEPEND="${DEPEND}"
74
75 S="${WORKDIR}/${MY_P}"
76
77 DOCS=(README TODO ChangeLog)
78
79 src_prepare() {
80 epatch "${FILESDIR}"/${P}-satacmds.patch
81 epatch "${FILESDIR}"/${P}-byteswap.patch
82 epatch "${FILESDIR}"/${P}-execinfo.patch
83 epatch "${FILESDIR}"/${P}-nls.patch
84 epatch "${FILESDIR}"/${P}-iconv.patch
85 epatch "${FILESDIR}"/${P}-dontwake.patch
86 AT_M4DIR="m4" eautoreconf
87 }
88
89 src_configure() {
90 local myconf
91
92 myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
93 # disabling nls breaks compiling
94 use nls || myconf="--disable-nls ${myconf}"
95 econf ${myconf}
96 }
97
98 src_install() {
99 default
100
101 insinto /usr/share/hddtemp
102 newins "${WORKDIR}/hddtemp-${DBV}.db" hddtemp.db
103 doins "${FILESDIR}"/hddgentoo.db
104
105 update_db "${D}/usr/share/hddtemp/hddgentoo.db" "${D}/usr/share/hddtemp/hddtemp.db"
106 newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp
107 newinitd "${FILESDIR}"/hddtemp-init hddtemp
108 systemd_newunit "${FILESDIR}"/hddtemp.service-r1 "${PN}.service"
109 systemd_install_serviced "${FILESDIR}"/hddtemp.service.conf
110
111 dosbin "${FILESDIR}"/update-hddtemp.db
112
113 if use network-cron ; then
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 elog " update-hddtemp.db"
123 elog ""
124 elog "If your hard drive is not recognized by hddtemp, please consider"
125 elog "submitting your HDD info for inclusion into the Gentoo hddtemp"
126 elog "database by filing a bug at https://bugs.gentoo.org/"
127 echo
128 ewarn "If hddtemp complains but finds your HDD temperature sensor, use the"
129 ewarn "--quiet option to suppress the warning."
130 }
131
132 update_db() {
133 local src=$1
134 local dst=$2
135
136 while read line ; do
137 if [[ -z $(echo "${line}" | sed -re 's/(^#.*|^\w*$)//') ]]; then
138 echo "${line}" >> "${dst}"
139 fi
140
141 id=$(echo "${line}" | grep -o '"[^"]*"')
142
143 grep "${id}" "${dst}" 2>&1 >/dev/null || echo "${line}" >> "${dst}"
144 done < "${src}"
145 }
146
147
148
149 1.1 app-admin/hddtemp/hddtemp-0.3_beta15-r7.ebuild
150
151 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r7.ebuild?rev=1.1&view=markup
152 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r7.ebuild?rev=1.1&content-type=text/plain
153
154 Index: hddtemp-0.3_beta15-r7.ebuild
155 ===================================================================
156 # Copyright 1999-2013 Gentoo Foundation
157 # Distributed under the terms of the GNU General Public License v2
158 # $Header: /var/cvsroot/gentoo-x86/app-admin/hddtemp/hddtemp-0.3_beta15-r7.ebuild,v 1.1 2013/09/28 08:09:02 pacho Exp $
159
160 inherit eutils autotools systemd
161
162 MY_P=${P/_beta/-beta}
163 DBV=20080531
164
165 DESCRIPTION="A simple utility to read the temperature of SMART capable hard drives"
166 HOMEPAGE="http://savannah.nongnu.org/projects/hddtemp/"
167 SRC_URI="http://download.savannah.gnu.org/releases/hddtemp/${MY_P}.tar.bz2 mirror://gentoo/hddtemp-${DBV}.db.bz2"
168
169 LICENSE="GPL-2"
170 SLOT="0"
171 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
172 IUSE="nls"
173
174 DEPEND=""
175 RDEPEND="${DEPEND}"
176
177 S="${WORKDIR}/${MY_P}"
178
179 src_unpack() {
180 unpack ${A}
181 cd "${S}"
182 epatch "${FILESDIR}"/${P}-satacmds.patch
183 epatch "${FILESDIR}"/${P}-byteswap.patch
184 epatch "${FILESDIR}"/${P}-execinfo.patch
185 epatch "${FILESDIR}"/${P}-nls.patch
186 epatch "${FILESDIR}"/${P}-iconv.patch
187 epatch "${FILESDIR}"/${P}-dontwake.patch
188 AT_M4DIR="m4" eautoreconf
189 }
190
191 src_compile() {
192 local myconf
193
194 myconf="--with-db-path=/usr/share/hddtemp/hddtemp.db"
195 # disabling nls breaks compiling
196 use nls || myconf="--disable-nls ${myconf}"
197 econf ${myconf} || die
198 emake || die
199 }
200
201 src_install() {
202 make DESTDIR="${D}" install || die
203 dodoc README TODO ChangeLog
204
205 insinto /usr/share/hddtemp
206 newins "${WORKDIR}/hddtemp-${DBV}.db" hddtemp.db
207 doins "${FILESDIR}"/hddgentoo.db
208
209 update_db "${D}/usr/share/hddtemp/hddgentoo.db" "${D}/usr/share/hddtemp/hddtemp.db"
210 newconfd "${FILESDIR}"/hddtemp-conf.d hddtemp
211 newinitd "${FILESDIR}"/hddtemp-init hddtemp
212 systemd_newunit "${FILESDIR}"/hddtemp.service-r1 "${PN}.service"
213 systemd_install_serviced "${FILESDIR}"/hddtemp.service.conf
214 }
215
216 pkg_postinst() {
217 elog "In order to update your hddtemp database, run:"
218 elog " emerge --config =${CATEGORY}/${PF}"
219 elog ""
220 elog "If your hard drive is not recognized by hddtemp, please consider"
221 elog "submitting your HDD info for inclusion into the Gentoo hddtemp"
222 elog "database by filing a bug at https://bugs.gentoo.org/"
223 echo
224 ewarn "If hddtemp complains but finds your HDD temperature sensor, use the"
225 ewarn "--quiet option to suppress the warning."
226 }
227
228 update_db() {
229 local src=$1
230 local dst=$2
231
232 while read line ; do
233 if [[ -z $(echo "${line}" | sed -re 's/(^#.*|^\w*$)//') ]]; then
234 echo "${line}" >> "${dst}"
235 fi
236
237 id=$(echo "${line}" | grep -o '"[^"]*"')
238
239 grep "${id}" "${dst}" 2>&1 >/dev/null || echo "${line}" >> "${dst}"
240 done < "${src}"
241 }
242
243 pkg_config() {
244 cd "${ROOT}"/usr/share/hddtemp
245
246 einfo "Trying to download the latest hddtemp.db file"
247 wget http://www.guzu.net/linux/hddtemp.db -O hddtemp.db \
248 || die "failed to download hddtemp.db"
249
250 update_db "hddgentoo.db" "hddtemp.db"
251 }