summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2016-01-27 14:26:11 +0100
committerWolfram Schlich <wschlich@gentoo.org>2016-01-27 14:26:11 +0100
commit57843db712e10b6d08cd22631b15b04097850c74 (patch)
tree947a8d74f016f6a36ff317e95bfc1ec505ad4ceb /app-misc/digitemp/digitemp-3.7.1.ebuild
parentdev-libs/cyberjack: version bump (diff)
downloadgentoo-57843db712e10b6d08cd22631b15b04097850c74.tar.gz
gentoo-57843db712e10b6d08cd22631b15b04097850c74.tar.bz2
gentoo-57843db712e10b6d08cd22631b15b04097850c74.zip
app-misc/digitemp: version bump
Package-Manager: portage-2.2.27
Diffstat (limited to 'app-misc/digitemp/digitemp-3.7.1.ebuild')
-rw-r--r--app-misc/digitemp/digitemp-3.7.1.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/app-misc/digitemp/digitemp-3.7.1.ebuild b/app-misc/digitemp/digitemp-3.7.1.ebuild
new file mode 100644
index 00000000000..80024ae592c
--- /dev/null
+++ b/app-misc/digitemp/digitemp-3.7.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Temperature logging and reporting using Maxim's iButtons and 1-Wire protocol"
+HOMEPAGE="http://www.digitemp.com/ http://www.ibutton.com/"
+SRC_URI="https://github.com/bcl/digitemp/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+IUSE="ds9097 ds9097u ds2490"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="ds2490? ( virtual/libusb:0 )"
+
+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_prepare() {
+ sed -i -e "/^CFLAGS/s:-O2:${CFLAGS}:" \
+ -e "/^LIBS/s:=:= ${LDFLAGS}:" Makefile
+ # 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
+}
+
+src_compile() {
+ local targets=$(targets)
+
+ for target in $targets; do
+ emake clean
+ emake CC="$(tc-getCC)" LOCK="no" ${target} || die "emake ${target} failed"
+ done
+}
+
+src_install() {
+ 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
+
+ for example in perl python rrdb; do
+ insinto "/usr/share/doc/${PF}/${example}_examples"
+ doins -r ${example}/*
+ done
+}
+
+pkg_postinst() {
+ echo
+ elog "Examples of using digitemp with python, perl, and rrdtool are"
+ elog "located in /usr/share/doc/${PF}/"
+ echo
+}