blob: 515913ecf0b2d03775a22e8d1f18c5279f553cd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/digitemp-3.2.0.ebuild,v 1.8 2007/01/28 05:08:08 genone Exp $
DESCRIPTION="Temperature logging and reporting using Dallas Semiconductor's iButtons and 1-Wire protocol"
HOMEPAGE="http://www.digitemp.com http://www.ibutton.com"
SRC_URI="http://www.digitemp.com/software/linux/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE=""
DEPEND="virtual/libc"
src_compile() {
# default is to compile to the ds9097u. local use flag takes care of
# passive ds9097. the ds9097u setting is what i have, so probably a safe
# default - nothing special here.
local target="ds9097u"
[ "${SERIAL_DRIVER}" = ds9097 ] && target="ds9097"
make clean
ewarn ""
ewarn "making for ${target} serial controller. if you would like support"
ewarn "for another controller, please set SERIAL_DRIVER=\"ds9097u\" or"
ewarn "SERIAL_DRIVER=\"ds9097\" as appropriate"
ewarn ""
make ${target}
}
src_install() {
dobin digitemp || die
dodoc README FAQ TODO
# method one: don't treat the examples as docs; place them somewhere else.
# then tell the user where to find this stuff. suitable alternative:
# specify exampledir="/usr/share/doc/${PF}"
local exampledir="/usr/share/${PN}"
local perldir="${exampledir}/perl_examples"
insinto ${perldir}
doins perl/*
local pythondir="${exampledir}/python_examples"
insinto ${pythondir}
doins python/*
local rrdbdir="${exampledir}/rrdb_examples"
insinto ${rrdbdir}
doins rrdb/*
}
pkg_postinst() {
ewarn "set the SERIAL_DRIVER environment variable to ds9097 to build"
ewarn "for that controller instead"
elog ""
elog "examples of using digitemp with python, perl, and rrdtool are"
elog "located in ${exampledir}"
elog ""
}
|