diff options
author | Stuart Shelton <stuart@shelton.me> | 2018-04-29 20:58:07 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2018-04-29 21:07:10 +0100 |
commit | 6cc6f19bcd73a869b6406c0de0db24927df562c3 (patch) | |
tree | 9897e5f88a2afdad2cfac21583cfb0839c23f12f | |
parent | Add net-misc/unifi-controller-bin-5.6.37, net-misc/unifi-controller-bin-5.7.23 (diff) | |
download | srcshelton-6cc6f19bcd73a869b6406c0de0db24927df562c3.tar.gz srcshelton-6cc6f19bcd73a869b6406c0de0db24927df562c3.tar.bz2 srcshelton-6cc6f19bcd73a869b6406c0de0db24927df562c3.zip |
Add sys-apps/lm_sensors-3.4.0_p20180318
-rw-r--r-- | sys-apps/lm_sensors/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild | 215 |
2 files changed, 217 insertions, 0 deletions
diff --git a/sys-apps/lm_sensors/Manifest b/sys-apps/lm_sensors/Manifest index 4ba54a51..3a07b89e 100644 --- a/sys-apps/lm_sensors/Manifest +++ b/sys-apps/lm_sensors/Manifest @@ -9,5 +9,7 @@ AUX sensord.initd 578 BLAKE2B 7945b89a13fa772978a3ecc57e27e18717e0115511544872de AUX sensord.service-r1 159 BLAKE2B 0358cdfe750a0435c32ba4d8017be3c2bb06c0de8a17849e6d16f8d6bf79f1f3d49560d868bc73a95d3633e5db10e0d45947f0621b7b90e9f28995ac15e782e9 SHA512 c554910a36e44d84f64d5c8924170c3eaccf9715aee2157a37ecf542a1d254c0d9a269555ec3e99165ef7e39874616bc07dddc01c8d708114232df58232c3906 DIST lm_sensors-3.4.0_p20160725.tar.gz 206868 BLAKE2B ba79935e1acb62d5f31fc53975904ab7fd19f619fdc5edc342bcfa1f8d2e16e3ac41711ad33bc9766ece89325236887d722b06c9d6698c420e9506d77dca7ef6 SHA512 abae5c4ba2ed0b763fda918e2ededb2148a3edd1d33709a34b91a33398a64e8988d14c5d16a5c756bf55beaa383e661c76e1acccc7b5ef858aa772e96878131b DIST lm_sensors-3.4.0_p20170901.tar.gz 208487 BLAKE2B b6d2eb6efee25891fbd655738ba25e91d8ec5d97f07e24ee217ab1a59c51a8ab59e042a90ed6fa1de4459992adc740252588419c0f74ce02f9ad7c1f4f9750da SHA512 5c4a750efdff2ef086a5ed1b6a8a03278872ca077255eae91d0696af229f37b09216e2f53d1d6e4602596fd8b978e0b9c27327357621486c5d7b1d39ecd16fea +DIST lm_sensors-3.4.0_p20180318.tar.gz 260899 BLAKE2B a859c20ef148f80cc9d5ead61547feb5c26a77447aeedf9273334fc1e5b4075c74d8f786102e33e8fc771968dd605829923f8d3da8293fef168c74b8c55bf32a SHA512 923ee985d8e0b8fdc43b2e4418873ccbeb8433adbf2efe71fcaba1df0c6971d502866abe8ea015d199380e06e3cfd35d945451e5e9f7e64cede35fff37621aee EBUILD lm_sensors-3.4.0_p20160725.ebuild 6342 BLAKE2B f18c85698b22b1ad96d47dde178aa85fa12065ab311a6d036f1ddcd7cd30bf818d367a38df7e629aa0c93b1a7796f16fd4a7741772eabe3003b6b763864b7e0d SHA512 408d8547ae0eb5f517c8d93ab4b523d2cbcf83252b2292c524f37d94c34088158d4954748ce73f9078e7bb52490036b611aa11ee20d80e8fb2a7710fe1dc14d4 EBUILD lm_sensors-3.4.0_p20170901.ebuild 6432 BLAKE2B daaace2182140249c7325a55918c356731b00b69eedfc9f1f8ad532022cdd6dcc03571e18c9127d513b31ecf160cf64f604211f3224a0d000b6ec2f295979ea7 SHA512 6c8a493523f9a17994cbbbde1bde51faa6f7e26a71e85f6e2fd1713fa9ea629469dff078ff25dfb39512c9c7f815419a84dd94a81af35b77eab4963a3c0aa32f +EBUILD lm_sensors-3.4.0_p20180318.ebuild 6440 BLAKE2B ddc5a5c22e916774a343429577ee455ad10e08bf02e277cdd41cc95615e2d85ad85f3bfffbb53aadeaaf1e63819c111a54af60977e83d172620203c49d3abb4a SHA512 e858421aaeaff494b7b6df1d72355420832de1774acc6b537ba9425c45f42c2021e4b0568395082c08130b21923656a411f52534e5cc52a69d736ff35ff0c7d4 diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild new file mode 100644 index 00000000..9f5aa74c --- /dev/null +++ b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180318.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2018 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="6d970e5eb196061605c138c9dcbc833b052c4f3a" +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 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux" +IUSE="contrib sensord static-libs systemd" + +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=\"/var/run/fancontrol.pid\":" \ + prog/pwm/pwmconfig || \ + die "Failed to adjust prog/pwm/pwmconfig" + else + sed -i \ + -e "s:^PIDFILE=\".*:PIDFILE=\"/var/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=\"/var/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="${EPREFIX%/}/usr" \ + MANDIR="${EPREFIX%/}/usr/share/man" \ + ETCDIR="${EPREFIX%/}/etc" \ + LIBDIR="${EPREFIX%/}/usr/$(get_libdir)" \ + install +} + +multilib_src_install_all() { + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + use systemd && systemd_dounit prog/init/lm_sensors.service + + newinitd "${FILESDIR}"/fancontrol.initd fancontrol + newconfd "${FILESDIR}"/fancontrol.confd fancontrol + use systemd && systemd_newunit "${FILESDIR}"/fancontrol.service-r1 fancontrol.service + + if use sensord; then + newconfd "${FILESDIR}"/sensord.confd sensord + newinitd "${FILESDIR}"/sensord.initd sensord + use systemd && 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 requires 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 +} |