public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/lm_sensors/
Date: Tue,  3 Oct 2017 15:03:20 +0000 (UTC)	[thread overview]
Message-ID: <1507042979.8e427637ea7c6d9528eaefb9410d7e1b6cf369eb.whissi@gentoo> (raw)

commit:     8e427637ea7c6d9528eaefb9410d7e1b6cf369eb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  3 15:02:59 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct  3 15:02:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e427637

sys-apps/lm_sensors: New snapshot release from 2017-09-01

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 sys-apps/lm_sensors/Manifest                       |   1 +
 .../lm_sensors/lm_sensors-3.4.0_p20170901.ebuild   | 215 +++++++++++++++++++++
 sys-apps/lm_sensors/metadata.xml                   |   6 +
 3 files changed, 222 insertions(+)

diff --git a/sys-apps/lm_sensors/Manifest b/sys-apps/lm_sensors/Manifest
index 7abb62626fc..52d8c90de85 100644
--- a/sys-apps/lm_sensors/Manifest
+++ b/sys-apps/lm_sensors/Manifest
@@ -1 +1,2 @@
 DIST lm_sensors-3.4.0_p20160725.tar.gz 206868 SHA256 c3bb872cabcf3fa4b597bc1a8d6ee277a80b28c811125a45341e0874a97ac102 SHA512 abae5c4ba2ed0b763fda918e2ededb2148a3edd1d33709a34b91a33398a64e8988d14c5d16a5c756bf55beaa383e661c76e1acccc7b5ef858aa772e96878131b WHIRLPOOL 4d7620f74ea46f559b6b293a7cb20f0296277f7c10f54b368fd63bef2d1496b3769f39066cc4f980337d99b3a1dbb51af8e9eed724605f153a08cfa9fd28739b
+DIST lm_sensors-3.4.0_p20170901.tar.gz 208487 SHA256 b142efde3290a36e4080eab2a4003a11eaf43cb2431307e34a738be0887dc45f SHA512 5c4a750efdff2ef086a5ed1b6a8a03278872ca077255eae91d0696af229f37b09216e2f53d1d6e4602596fd8b978e0b9c27327357621486c5d7b1d39ecd16fea WHIRLPOOL 45a7ab8b729c2430fd52e2b3f06ca72a61445efab66e71c554e6e4b9d0793b1396879dd1d1221001fe1dc008596047ac1330676fe75e6f244b209c368189be57

diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
new file mode 100644
index 00000000000..e8e4a92c8a2
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20170901.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-info systemd toolchain-funcs multilib-minimal
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="https://hwmon.wiki.kernel.org/ https://github.com/groeck/lm-sensors"
+
+COMMIT="83cafd29f28d463573750d897014ec7143217ae5"
+MY_PN="${PN/_/-}"
+
+#SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+SRC_URI="https://github.com/groeck/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1"
+
+# SUBSLOT based on SONAME of libsensors.so
+SLOT="0/4.4.0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="contrib sensord static-libs"
+
+COMMON_DEPS="
+	sensord? (
+		net-analyzer/rrdtool
+		virtual/logger
+	)"
+
+RDEPEND="${COMMON_DEPS}
+	dev-lang/perl
+	!<sys-apps/openrc-0.21.7"
+
+DEPEND="${COMMON_DEPS}
+	sys-devel/bison
+	sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.0-sensors-detect-gentoo.patch )
+
+DOCS=( CHANGES CONTRIBUTORS INSTALL README )
+DOCS+=( doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid} )
+
+S="${WORKDIR}/${MY_PN}-${COMMIT}"
+
+src_prepare() {
+	default
+
+	if [[ -n "${COMMIT}" ]]; then
+		local _version="${PV%_*}+git_${COMMIT}"
+
+		sed -i \
+			-e "s:LM_VERSION.*:LM_VERSION \"${_version}\":" \
+			version.h || \
+			die "Failed to update version.h"
+
+		sed -i \
+			-e "s/^\$revision = '.*/\$revision = '${_version}';/" \
+			-e "/^\$revision =~ s.*/d" \
+			prog/detect/sensors-detect || \
+			die "Failed to set revision in prog/detect/sensors-detect"
+
+		sed -i \
+			-e "s/^echo \"# pwmconfig revision.*/echo \"# pwmconfig revision ${_version}\"/" \
+			-e "/^REVISION=.*/d" \
+			-e "/^REVDATE=.*/d" \
+			-e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+			prog/pwm/pwmconfig || \
+			die "Failed to adjust prog/pwm/pwmconfig"
+	else
+		sed -i \
+			-e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+			prog/pwm/pwmconfig || \
+			die "Failed to adjust PIDFILE in prog/pwm/pwmconfig"
+	fi
+
+	# Respect LDFLAGS
+	sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || \
+		die "Failed to sed in LDFLAGS"
+
+	sed -i \
+		-e "s:^PIDFILE=\".*:PIDFILE=\"/run/fancontrol.pid\":" \
+		prog/pwm/fancontrol || \
+		die "Failed to adjust PIDFILE of prog/pwm/fancontrol"
+
+	# Don't use EnvironmentFile in systemd unit
+	sed -i \
+		-e '/^EnvironmentFile=/d' \
+		-e '/^Exec.*modprobe.*/d' \
+		prog/init/lm_sensors.service || \
+		die "Failed to remove EnvironmentFile from systemd unit file"
+
+	if ! use static-libs; then
+		sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || \
+			die "Failed to disable static building"
+	fi
+
+	# Don't show outdated user instructions
+	sed -i -e '/^	@echo "\*\*\* /d' Makefile || \
+		die "Failed to remove outdated user instructions"
+
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	default
+
+	if multilib_is_native_abi && use sensord; then
+		# sensord requires net-analyzer/rrdtool which doesn't have real multilib
+		# support. To prevent errors like
+		# 
+		#   skipping incompatible /usr/lib/librrd.so when searching for -lrrd 
+		#   cannot find -lrrd
+		# 
+		# we only build sensord when we are building for profile's native ABI
+		# (it doesn't affect libsensors.so).
+		sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || \
+			die "Failed to enable building of sensord"
+	fi
+}
+
+multilib_src_compile() {
+	emake \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)"
+}
+
+multilib_src_install() {
+	emake \
+		DESTDIR="${D%/}" \
+		PREFIX="/usr" \
+		MANDIR="/usr/share/man" \
+		ETCDIR="/etc" \
+		LIBDIR="/usr/$(get_libdir)" \
+		install
+}
+
+multilib_src_install_all() {
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	systemd_dounit prog/init/lm_sensors.service
+
+	newinitd "${FILESDIR}"/fancontrol.initd fancontrol
+	newconfd "${FILESDIR}"/fancontrol.confd fancontrol
+	systemd_newunit "${FILESDIR}"/fancontrol.service-r1 fancontrol.service
+
+	if use sensord; then
+		newconfd "${FILESDIR}"/sensord.confd sensord
+		newinitd "${FILESDIR}"/sensord.initd sensord
+		systemd_newunit "${FILESDIR}"/sensord.service-r1 sensord.service
+	fi
+
+	einstalldocs
+
+	docinto developers
+	dodoc doc/developers/applications
+
+	if use contrib; then
+		insinto /usr/share/${PN}
+		doins -r "${S}"/configs
+	fi
+}
+
+pkg_postinst() {
+	local _new_loader='3.4.0_p20160725'
+	local _v
+	for _v in ${REPLACING_VERSIONS}; do
+		if ! version_is_at_least ${_new_loader} ${v}; then
+			# This is an upgrade which require migration
+
+			elog ""
+			elog "Since version 3.4.0_p20160725 ${PN} no longer loads modules on its own"
+			elog "instead it is using \"modules-load\" services provided by OpenRC or systemd."
+			elog ""
+			elog "To migrate your configuration you have 2 options:"
+			elog ""
+			elog "  a) Re-create a new configuration using \"/usr/sbin/sensors-detect\""
+			elog ""
+			elog "  b) Copy existing \"modules_<n>\", \"HWMON_MODULES\" or \"BUS_MODULES\""
+			elog "     variables from \"/etc/conf.d/lm_modules\" to"
+			elog "     \"/etc/modules-load.d/lm_sensors.conf\" and adjust format."
+			elog ""
+			elog "     For details see https://wiki.gentoo.org/wiki/Systemd#Automatic_module_loading"
+			elog ""
+			elog "     Important: Don't forget to migrate your module's argument"
+			elog "                (modules_<name>_args variable) if your are not already"
+			elog "                using \"/etc/modprobe.d\" (which is recommended)."
+
+			# Show this elog only once
+			break
+		fi
+	done
+
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		# New installation
+
+		elog ""
+		elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+		elog "\"/etc/modules-load.d/lm_sensors.conf\"."
+		elog ""
+		elog "You might want to add ${PN} to your default runlevel to make"
+		elog "sure the sensors get initialized on the next startup."
+		elog ""
+		elog "Be warned, the probing of hardware in your system performed by"
+		elog "sensors-detect could freeze your system. Also make sure you read"
+		elog "the documentation before running ${PN} on IBM ThinkPads."
+	fi
+}

diff --git a/sys-apps/lm_sensors/metadata.xml b/sys-apps/lm_sensors/metadata.xml
index 164d1b16031..897d37da356 100644
--- a/sys-apps/lm_sensors/metadata.xml
+++ b/sys-apps/lm_sensors/metadata.xml
@@ -13,6 +13,12 @@
 		<subslots>Reflect ABI of libsensors.so.</subslots>
 	</slots>
 	<use>
+		<flag name="contrib">
+			Installs user contributed configuration files so you don't need
+			to find settings on your own for your system if somebody else
+			has already created such a configuration for sensors/mainboards
+			you are using.
+		</flag>
 		<flag name="sensord">
 			Enable sensord - a daemon that can be used to
 			periodically log sensor readings from hardware health-monitoring


             reply	other threads:[~2017-10-03 15:03 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 15:03 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-12 14:28 [gentoo-commits] repo/gentoo:master commit in: sys-apps/lm_sensors/ Michał Górny
2019-04-21  1:38 Lars Wendler
2019-04-20 17:57 Mikle Kolyada
2019-02-22 12:04 Mikle Kolyada
2019-02-13 10:59 Mikle Kolyada
2019-02-12 21:03 Sergei Trofimovich
2019-02-10  9:32 Sergei Trofimovich
2019-02-09 19:35 Sergei Trofimovich
2019-02-09 18:36 Thomas Deutschmann
2018-11-28 12:50 Lars Wendler
2018-11-11 22:37 Thomas Deutschmann
2018-11-11 11:18 Mikle Kolyada
2018-10-15 18:43 Sergei Trofimovich
2018-10-13  6:56 Tobias Klausmann
2018-10-12 19:08 Sergei Trofimovich
2018-10-09 21:24 Thomas Deutschmann
2018-10-09  8:40 Mikle Kolyada
2018-10-09  5:12 Matt Turner
2018-10-09  5:12 Matt Turner
2018-09-26 22:49 Thomas Deutschmann
2018-09-26 22:49 Thomas Deutschmann
2018-08-24  1:10 Thomas Deutschmann
2018-08-03  1:19 Thomas Deutschmann
2018-04-16 12:53 Thomas Deutschmann
2018-04-16 12:53 Thomas Deutschmann
2018-04-13 23:22 Aaron Bauman
2018-03-15 16:03 Mikle Kolyada
2018-03-03 13:12 Tobias Klausmann
2018-01-06 14:25 Sergei Trofimovich
2018-01-03 19:51 Sergei Trofimovich
2018-01-02 23:34 Mikle Kolyada
2017-10-03 14:25 Thomas Deutschmann
2017-06-19 20:07 Alexis Ballier
2017-01-08 18:19 Markus Meier
2016-12-20 12:37 Thomas Deutschmann
2016-12-17  8:54 Aaron Bauman
2016-11-24  9:50 Tobias Klausmann
2015-09-24 10:36 Agostino Sarubbo
2015-09-20  8:44 Jeroen Roovers
2015-09-06 12:42 Agostino Sarubbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507042979.8e427637ea7c6d9528eaefb9410d7e1b6cf369eb.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox