diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-08-25 07:36:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-08-25 07:36:27 +0100 |
commit | 43793fab84041cfc5c60c0151d1591b8a69fb24a (patch) | |
tree | 6208a7f4fc744684fce0f55acbb47511acace498 /sys-apps/lm_sensors | |
parent | 28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff) |
gentoo resync : 25.08.2018
Diffstat (limited to 'sys-apps/lm_sensors')
-rw-r--r-- | sys-apps/lm_sensors/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/lm_sensors/lm_sensors-3.4.0_p20180820.ebuild | 215 |
2 files changed, 217 insertions, 0 deletions
diff --git a/sys-apps/lm_sensors/Manifest b/sys-apps/lm_sensors/Manifest index 6ed615693745..d44a01b207e3 100644 --- a/sys-apps/lm_sensors/Manifest +++ b/sys-apps/lm_sensors/Manifest @@ -9,6 +9,8 @@ AUX sensord.initd 574 BLAKE2B bbc4e39d6b906a0e7539c4521420b9da686722eb6d26d486c2 AUX sensord.service-r1 155 BLAKE2B 8a61565976b7d333dfb257d0e57a18140229bedb44fc095446e64de85d829f3d34802d4f762967cc503d527b8f28deaeaf3e0a93b3a4384b9c9b62a8b71d4dfe SHA512 83132636209f3e3717edad28ed230f767ee8bf00eabf3036238f64c370d1e42db1c14d1ed965c650da8aa3a6deb3ce7a0794425491ff7f8ce67e2fde934fc4fb 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 +DIST lm_sensors-3.4.0_p20180820.tar.gz 261837 BLAKE2B 5b072a71554fa2ae41dd0fa51b66dcf32874579eef51a94d36b95e92b77629fbdf193a281bde3258af60366df38cacec6da67055f9f4766d863d37673f6a5065 SHA512 99ca718ae0e832fab8cbb3a2ab106f5df2fad9e822df99ee24d73758c64853a05c50464081e84335680a44ad93acaa6d4f0ef21291b7f008f24bcaa292d0fdab EBUILD lm_sensors-3.4.0_p20170901.ebuild 6330 BLAKE2B 8b17a747524ae07e3105d570109a18cbd690725c834234bfc82ed926bac576b97e1d5fbb2c7fd58fcace61dc95807391961ebe15beb1bf6cafd462f86fa32f1c SHA512 afe2db6d3699a1ae079a4994746fe214269c89b09ab641788b73b0c7ecd780713210ed31251edd1eb4141b7679b7124c0f6ee22a33a150aef8dff13e482ab03d EBUILD lm_sensors-3.4.0_p20180318.ebuild 6338 BLAKE2B 99b2847e9f3de45368b3dc1d9de7006c340a4b336f6ea82eb2220c7a45342f680bd3bc9d005338868b96b9bf65816da0ae29f3945029ac6b9fd806ebe957163b SHA512 526fb55c056d3782c9461a2bb1eb8af5b3816225fc923563e66ca23c1435736ec2ce74cd88865cd7411cef9e47ac641e7815cd3c5b2d404d093dcb6a988fa36e +EBUILD lm_sensors-3.4.0_p20180820.ebuild 6338 BLAKE2B 189d222d04f813564610348a131b87ad9bd13deead56287ded42573c2457efed572028eef88b75426afa35e511d7468563ff17f2f0250badc8b0e3c71832f29c SHA512 6d0b4f26dd725703e2f411a56347f50c746f9ac2560a62721f9a88bb78bdecc603808359dbaee9d0c74f75ac005018b1a049ad2f5813586e1a1c2f1395844357 MISC metadata.xml 943 BLAKE2B dec9c9764069667a9f5f5cd8359d0dc06020d6acbed972daab0b538b9f172f6d081a057cc6c55362de11c26857d1a885bb8a04e18dab1062370a8ddf0e25d7e8 SHA512 c32b85e2771b216861bf16d8c7ccfc8277b34c7ab712edaf487083f8d9e2a8e3707b65d1dd952e92d925fbefa87cf76799aa0b30f11ae8acfd4ffe27f2caf1f8 diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180820.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180820.ebuild new file mode 100644 index 000000000000..98927537b6e0 --- /dev/null +++ b/sys-apps/lm_sensors/lm_sensors-3.4.0_p20180820.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 eapi7-ver + +DESCRIPTION="Hardware Monitoring user-space utilities" +HOMEPAGE="https://hwmon.wiki.kernel.org/ https://github.com/groeck/lm-sensors" + +COMMIT="2ddf3e5ad5ded5ee8857f50cf79d4c6ff7a1c8db" +MY_PN="${PN/_/-}" + +#SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2" +SRC_URI="https://github.com/lm-sensors/${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" + +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 ! ver_test "${_v}" -gt "${_new_loader}"; 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 +} |