diff options
author | Charlie Shepherd <masterdriverz@gentoo.org> | 2007-01-02 23:42:03 +0000 |
---|---|---|
committer | Charlie Shepherd <masterdriverz@gentoo.org> | 2007-01-02 23:42:03 +0000 |
commit | 93ecfe45f1b72c234d700026d521bb98fcb2a2ab (patch) | |
tree | 3995e34a5e893c29eb4c8c8ac507f97396db813f /app-misc/digitemp | |
parent | Add new flags for app-misc/digitemp (diff) | |
download | gentoo-2-93ecfe45f1b72c234d700026d521bb98fcb2a2ab.tar.gz gentoo-2-93ecfe45f1b72c234d700026d521bb98fcb2a2ab.tar.bz2 gentoo-2-93ecfe45f1b72c234d700026d521bb98fcb2a2ab.zip |
Add the ability to build support for other sensors. Thanks to Pekka Paalanenbug - bug 145253
(Portage version: 2.1.2_rc4-r3)
Diffstat (limited to 'app-misc/digitemp')
-rw-r--r-- | app-misc/digitemp/ChangeLog | 9 | ||||
-rw-r--r-- | app-misc/digitemp/digitemp-3.3.2.ebuild | 87 | ||||
-rw-r--r-- | app-misc/digitemp/files/digest-digitemp-3.3.2 | 2 |
3 files changed, 55 insertions, 43 deletions
diff --git a/app-misc/digitemp/ChangeLog b/app-misc/digitemp/ChangeLog index 38155e7e7f31..e75a51f837a5 100644 --- a/app-misc/digitemp/ChangeLog +++ b/app-misc/digitemp/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-misc/digitemp -# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/ChangeLog,v 1.10 2005/12/20 23:49:10 vanquirius Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/ChangeLog,v 1.11 2007/01/02 23:42:03 masterdriverz Exp $ + + 02 Jan 2007; Charlie Shepherd <masterdriverz@gentoo.org> + -digitemp-3.3.1.ebuild, digitemp-3.3.2.ebuild: + Add the ability to build support for other sensors. Thanks to Pekka + Paalanenbug - bug 145253 20 Dec 2005; Marcelo Goes <vanquirius@gentoo.org> digitemp-3.3.2.ebuild: Another shot at fixing bug 115886. diff --git a/app-misc/digitemp/digitemp-3.3.2.ebuild b/app-misc/digitemp/digitemp-3.3.2.ebuild index 4fb705cbb8ce..cd8cdc6efe28 100644 --- a/app-misc/digitemp/digitemp-3.3.2.ebuild +++ b/app-misc/digitemp/digitemp-3.3.2.ebuild @@ -1,63 +1,68 @@ -# Copyright 1999-2005 Gentoo Foundation +# 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.3.2.ebuild,v 1.4 2005/12/20 23:49:10 vanquirius Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/digitemp/digitemp-3.3.2.ebuild,v 1.5 2007/01/02 23:42:03 masterdriverz 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" -IUSE="" +IUSE="ds9097 ds9097u ds2490" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" -DEPEND="virtual/libc" +DEPEND="ds2490? ( >=dev-libs/libusb-0.1.10a )" -exampledir="/usr/share/doc/${PF}" +targets() { + # default is to compile to the ds9097u. + if ! ( use ds9097 || use ds9097u || use ds2490 ); then + echo ds9097u + fi + for target in ds9097 ds9097u ds2490; do + if use ${target}; then + echo ${target} + fi + done +} src_compile() { - target="ds9097u" - # 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. - [ "${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 LOCK="no" ${target} || die + # default is to compile to the ds9097u. + if ! ( use ds9097 || use ds9097u || use ds2490 ); then + ewarn "If you don't choose a component to install, we default to ds9097u" + fi + + local targets=$(targets) + + for target in $targets; do + emake clean + emake LOCK="no" ${target} || die "emake ${target} failed" + done } src_install() { - target_upper="$(echo $target | tr '[:lower:]' '[:upper:]')" - mv digitemp_${target_upper} digitemp - dobin digitemp || die + for target in $(echo $(targets) | tr '[:lower:]' '[:upper:]'); do + dobin digitemp_${target} && \ + dosym digitemp_${target} /usr/bin/digitemp + done + + if [[ $($(targets)|wc -l) -ge 1 ]]; then + echo + ewarn "/usr/bin/digitemp has been symlinked to /usr/bin/digitemp_${target}" + ewarn "If you want to access the others, they are available at /usr/bin/digitemp_*" + echo + fi + 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 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/* + for example in perl python rrdb; do + insinto "/usr/share/doc/${PF}/${example}_examples" + doins ${example}/* + done } pkg_postinst() { - ewarn "set the SERIAL_DRIVER environment variable to ds9097 to build" - ewarn "for that controller instead" - einfo "" - einfo "examples of using digitemp with python, perl, and rrdtool are" - einfo "located in ${exampledir}" - einfo "" + echo + einfo "Examples of using digitemp with python, perl, and rrdtool are" + einfo "located in /usr/share/doc/${PF}/" + echo } diff --git a/app-misc/digitemp/files/digest-digitemp-3.3.2 b/app-misc/digitemp/files/digest-digitemp-3.3.2 index 1b6ecb1934e8..07c39cae5dd2 100644 --- a/app-misc/digitemp/files/digest-digitemp-3.3.2 +++ b/app-misc/digitemp/files/digest-digitemp-3.3.2 @@ -1 +1,3 @@ MD5 0b6cfb36d198767836de54d9fb11bbdb digitemp-3.3.2.tar.gz 134223 +RMD160 b4520685c5cbcf528a4cedec9aece69603b10c45 digitemp-3.3.2.tar.gz 134223 +SHA256 5ffb948f9dda190007e28479fc26af929ab32e5d43a8e65f1650e176b033bd1b digitemp-3.3.2.tar.gz 134223 |