2007-01-15 23:36:43 +00:00
|
|
|
#
|
2011-01-24 15:08:05 +00:00
|
|
|
# spec file for package sensors
|
2007-01-15 23:36:43 +00:00
|
|
|
#
|
2020-05-07 13:11:19 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2007-01-15 23:36:43 +00:00
|
|
|
#
|
2008-09-29 16:18:11 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-19 14:50:11 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:36:43 +00:00
|
|
|
#
|
|
|
|
|
2008-03-13 18:06:12 +00:00
|
|
|
|
2018-12-16 11:30:36 +00:00
|
|
|
#%%define commit 1c48b191c8a2b9fc747e3db3816247c666c5c3f1
|
|
|
|
#%%define shortcommit 1c48b19
|
|
|
|
%define _name lm-sensors
|
2019-12-03 10:57:26 +00:00
|
|
|
%define _version 3-6-0
|
2017-11-24 10:01:27 +00:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2018-05-28 18:02:10 +00:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-24 10:01:27 +00:00
|
|
|
%endif
|
2007-01-15 23:36:43 +00:00
|
|
|
Name: sensors
|
2019-12-03 10:57:26 +00:00
|
|
|
Version: 3.6.0
|
2012-09-14 05:06:07 +00:00
|
|
|
Release: 0
|
2007-01-15 23:36:43 +00:00
|
|
|
Summary: Hardware health monitoring for Linux
|
2018-05-28 18:02:10 +00:00
|
|
|
License: GPL-2.0-or-later
|
2007-01-15 23:36:43 +00:00
|
|
|
Group: System/Monitoring
|
2019-12-03 10:57:26 +00:00
|
|
|
URL: https://github.com/lm-sensors/%{_name}
|
2018-12-17 07:33:06 +00:00
|
|
|
Source0: https://github.com/lm-sensors/%{_name}/archive/V%{_version}.tar.gz#/%{_name}-%{_version}.tar.gz
|
2018-12-16 11:30:36 +00:00
|
|
|
#Source0: https://github.com/groeck/lm-sensors/archive/%%{commit}/%%{_name}-%%{shortcommit}.tar.gz
|
2014-07-02 12:58:05 +00:00
|
|
|
Source1: sysconfig.sensord
|
2010-01-11 14:53:44 +00:00
|
|
|
Source2: baselibs.conf
|
2009-07-30 15:01:03 +00:00
|
|
|
Patch1: lm_sensors-3.1.1-build.patch
|
|
|
|
Patch2: lm_sensors-3.0.0-sensord-separate.patch
|
|
|
|
Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch
|
2008-10-23 10:29:59 +00:00
|
|
|
Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch
|
2016-01-31 12:31:27 +00:00
|
|
|
Patch6: lm_sensors-3.4.0-sensord-service-extra-args.patch
|
2016-09-07 07:13:35 +00:00
|
|
|
#PATCH-FEATURE-UPSTREAM add ftsteutates support
|
|
|
|
Patch7: lm_sensors-3.4.0-sensors-detect-add-ftsteutates-support.patch
|
2019-12-03 10:57:26 +00:00
|
|
|
Patch8: lm_sensors-3.5.0-libsensors-fix-soname.patch
|
2020-05-07 13:11:19 +00:00
|
|
|
#PATCH-FEATURE-UPSTREAM add ftsteutates support
|
|
|
|
Patch9: lm_sensors-3.6.0-sensors-detect-fix-driver-for-w83677hgi.patch
|
2018-05-28 18:02:10 +00:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: rrdtool-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
Requires: modutils
|
2007-06-04 23:12:42 +00:00
|
|
|
ExcludeArch: s390 s390x
|
2012-11-01 17:17:08 +00:00
|
|
|
%{?systemd_requires}
|
2007-01-15 23:36:43 +00:00
|
|
|
|
|
|
|
%description
|
2018-05-28 18:02:10 +00:00
|
|
|
This package includes programs that show data from some sensor chips.
|
2007-01-15 23:36:43 +00:00
|
|
|
The interface /proc/bus/i2c/ is provided by loading kernel modules.
|
|
|
|
Which modules to load can be interactively detected as root by calling
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_sbindir}/sensors-detect. Warning, before using the sensors the default
|
|
|
|
configuration in %{_sysconfdir}/sensors.conf has to be checked and changed to fit
|
2007-01-15 23:36:43 +00:00
|
|
|
the actual set up of the mainboard and the BIOS used on that specific
|
|
|
|
mainboard!
|
|
|
|
|
2007-10-31 16:22:59 +00:00
|
|
|
%package -n sensord
|
|
|
|
Summary: Hardware health monitoring daemon
|
2018-05-28 18:02:10 +00:00
|
|
|
License: GPL-2.0-or-later
|
2007-10-31 16:22:59 +00:00
|
|
|
Group: System/Monitoring
|
2014-07-03 11:25:53 +00:00
|
|
|
Requires(pre): %fillup_prereq
|
2018-05-28 18:02:10 +00:00
|
|
|
Provides: sensors:%{_sbindir}/sensord
|
2007-10-31 16:22:59 +00:00
|
|
|
|
|
|
|
%description -n sensord
|
|
|
|
sensord is a daemon that can be used to periodically log sensor
|
|
|
|
readings from hardware health-monitoring chips to the system logs or a
|
|
|
|
round-robin database (RRD) and to alert when a sensor alarm is
|
|
|
|
signalled; for example, if a fan fails, a temperature limit is
|
|
|
|
exceeded, etc.
|
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%package -n libsensors4
|
2007-11-02 15:02:53 +00:00
|
|
|
Summary: Hardware health monitoring library
|
2018-05-28 18:02:10 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2007-11-03 15:17:50 +00:00
|
|
|
Group: System/Libraries
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%description -n libsensors4
|
2007-11-02 15:02:53 +00:00
|
|
|
libsensors offers a way for applications to access the hardware
|
|
|
|
monitoring chips of the system. A system-dependent configuration file
|
|
|
|
controls how the different inputs are labeled and what scaling factors
|
|
|
|
have to be applied for the specific hardware, so that the output makes
|
|
|
|
sense to the user.
|
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%package -n libsensors4-devel
|
2007-11-02 15:02:53 +00:00
|
|
|
Summary: Hardware health monitoring library
|
2018-05-28 18:02:10 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2007-11-03 15:17:50 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-09-14 05:06:07 +00:00
|
|
|
Requires: glibc-devel
|
2018-12-16 12:42:41 +00:00
|
|
|
Requires: libsensors4 = %{version}
|
2018-05-28 18:02:10 +00:00
|
|
|
Provides: sensors:%{_includedir}/sensors/sensors.h
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%description -n libsensors4-devel
|
2007-11-02 15:02:53 +00:00
|
|
|
libsensors offers a way for applications to access the hardware
|
|
|
|
monitoring chips of the system. A system-dependent configuration file
|
|
|
|
controls how the different inputs are labeled and what scaling factors
|
|
|
|
have to be applied for the specific hardware, so that the output makes
|
|
|
|
sense to the user.
|
|
|
|
|
2007-01-15 23:36:43 +00:00
|
|
|
%prep
|
2018-12-16 11:30:36 +00:00
|
|
|
%setup -q -n %{_name}-%{_version}
|
|
|
|
#%%setup -q -n lm-%%{name}-%%{commit}
|
2009-07-30 15:01:03 +00:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2008-10-23 10:29:59 +00:00
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
2016-01-31 12:31:27 +00:00
|
|
|
%patch6 -p1
|
2016-09-07 07:13:35 +00:00
|
|
|
%patch7 -p1
|
2016-10-05 06:45:24 +00:00
|
|
|
%patch8 -p1
|
2020-05-07 13:11:19 +00:00
|
|
|
%patch9 -p1
|
2010-11-30 14:47:02 +00:00
|
|
|
|
2007-01-15 23:36:43 +00:00
|
|
|
%build
|
2018-05-28 18:02:10 +00:00
|
|
|
RPM_OPT_FLAGS="%{optflags}"
|
2010-11-01 08:22:42 +00:00
|
|
|
make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir}
|
2007-01-15 23:36:43 +00:00
|
|
|
|
|
|
|
%install
|
2018-05-28 18:02:10 +00:00
|
|
|
make PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir} DESTDIR=%{buildroot} install
|
|
|
|
mkdir -p %{buildroot}/%{_docdir}/sensors %{buildroot}/%{_docdir}/sensord
|
2014-01-28 11:59:07 +00:00
|
|
|
cp -a doc/donations doc/fan-divisors \
|
|
|
|
doc/fancontrol.txt doc/libsensors-API.txt \
|
|
|
|
doc/progs doc/temperature-sensors \
|
2018-05-28 18:02:10 +00:00
|
|
|
doc/vid COPYING COPYING.LGPL %{buildroot}/%{_docdir}/sensors/
|
|
|
|
cp -a COPYING %{buildroot}/%{_docdir}/sensord/
|
|
|
|
chmod -R u+rwX,g+rX,o+rX %{buildroot}/%{_docdir}/sensors/ %{buildroot}/%{_docdir}/sensord/
|
|
|
|
chmod 0755 %{buildroot}/%{_libdir}/libsensors.so.*
|
|
|
|
mkdir -p %{buildroot}/%{_unitdir} %{buildroot}/%{_fillupdir}
|
|
|
|
cp -a prog/init/*.service %{buildroot}/%{_unitdir}/
|
2018-12-17 08:06:41 +00:00
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rclm_sensors
|
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcfancontrol
|
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcsensord
|
2018-05-28 18:02:10 +00:00
|
|
|
cp -a %{SOURCE1} %{buildroot}/%{_fillupdir}
|
2010-11-30 14:47:02 +00:00
|
|
|
|
2012-11-01 17:17:08 +00:00
|
|
|
%pre
|
2019-03-18 09:57:36 +00:00
|
|
|
%service_add_pre lm_sensors.service fancontrol.service
|
2018-05-28 18:02:10 +00:00
|
|
|
|
2009-07-30 15:01:03 +00:00
|
|
|
%post
|
|
|
|
sh -c '
|
2018-05-28 18:02:10 +00:00
|
|
|
CONFIG=%{_sysconfdir}/sysconfig/lm_sensors
|
2009-07-30 15:01:03 +00:00
|
|
|
test -r "$CONFIG" || exit 0
|
|
|
|
unset ${!MODULE_*} $HWMON_MODULES
|
|
|
|
. "$CONFIG"
|
|
|
|
test -n "$HWMON_MODULES" && exit 0
|
|
|
|
for i in ${!MODULE_*} ; do
|
|
|
|
eval module=\$$i
|
|
|
|
if test -z "$HWMON_MODULES" ; then
|
|
|
|
HWMON_MODULES="$module"
|
|
|
|
else
|
|
|
|
HWMON_MODULES="$HWMON_MODULES $module"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
test -z "$HWMON_MODULES" && exit 0
|
|
|
|
echo >> "$CONFIG"
|
|
|
|
echo "# New configuration format generated by rpm post-install script" >> "$CONFIG"
|
|
|
|
echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG"
|
|
|
|
'
|
2018-05-28 18:02:10 +00:00
|
|
|
if test -e %{_sysconfdir}/modprobe.d/lm_sensors -a ! -e %{_sysconfdir}/modprobe.d/lm_sensors.conf ; then
|
|
|
|
mv -f %{_sysconfdir}/modprobe.d/lm_sensors %{_sysconfdir}/modprobe.d/lm_sensors.conf
|
2009-07-30 15:01:03 +00:00
|
|
|
fi
|
2019-03-18 09:57:36 +00:00
|
|
|
%service_add_post lm_sensors.service fancontrol.service
|
2018-12-17 07:33:06 +00:00
|
|
|
|
2009-01-12 01:14:43 +00:00
|
|
|
%preun
|
2019-03-18 09:57:36 +00:00
|
|
|
%service_del_preun fancontrol.service lm_sensors.service
|
2009-01-12 01:14:43 +00:00
|
|
|
|
2007-01-15 23:36:43 +00:00
|
|
|
%postun
|
2019-03-18 09:57:36 +00:00
|
|
|
%service_del_postun fancontrol.service lm_sensors.service
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2014-07-02 12:56:02 +00:00
|
|
|
%pre -n sensord
|
|
|
|
%service_add_pre sensord.service
|
|
|
|
|
|
|
|
%post -n sensord
|
|
|
|
%service_add_post sensord.service
|
2014-07-03 11:25:53 +00:00
|
|
|
%{fillup_only -n sensord}
|
2014-07-02 12:56:02 +00:00
|
|
|
|
|
|
|
%preun -n sensord
|
|
|
|
%service_del_preun sensord.service
|
|
|
|
|
|
|
|
%postun -n sensord
|
|
|
|
%service_del_postun sensord.service
|
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%post -n libsensors4 -p /sbin/ldconfig
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%postun -n libsensors4 -p /sbin/ldconfig
|
2007-01-15 23:36:43 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-11-01 17:17:08 +00:00
|
|
|
%{_unitdir}/lm_sensors.service
|
2013-11-21 09:47:07 +00:00
|
|
|
%{_sbindir}/rclm_sensors
|
2013-05-18 11:59:12 +00:00
|
|
|
%{_unitdir}/fancontrol.service
|
2018-12-17 07:33:06 +00:00
|
|
|
%{_sbindir}/rcfancontrol
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/fancontrol
|
2007-11-02 00:39:50 +00:00
|
|
|
%ifarch i386 i486 i586 i686 x86_64
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_sbindir}/isadump
|
|
|
|
%{_sbindir}/isaset
|
2007-11-02 00:39:50 +00:00
|
|
|
%endif
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_sbindir}/pwmconfig
|
|
|
|
%{_sbindir}/sensors-detect
|
2014-01-28 11:59:07 +00:00
|
|
|
%dir %{_docdir}/sensors
|
|
|
|
%doc %{_docdir}/sensors/donations
|
|
|
|
%doc %{_docdir}/sensors/fan-divisors
|
|
|
|
%doc %{_docdir}/sensors/fancontrol.txt
|
|
|
|
%doc %{_docdir}/sensors/progs
|
|
|
|
%doc %{_docdir}/sensors/temperature-sensors
|
|
|
|
%doc %{_docdir}/sensors/vid
|
2018-05-28 18:02:10 +00:00
|
|
|
%license %{_docdir}/sensors/COPYING
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
|
|
|
%{_mandir}/man8/fancontrol.8%{?ext_man}
|
2007-11-02 00:39:50 +00:00
|
|
|
%ifarch i386 i486 i586 i686 x86_64
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man8/isadump.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/isaset.8%{?ext_man}
|
2007-11-02 00:39:50 +00:00
|
|
|
%endif
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man8/pwmconfig.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/sensors-conf-convert.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/sensors-detect.8%{?ext_man}
|
2007-10-31 16:22:59 +00:00
|
|
|
|
|
|
|
%files -n sensord
|
|
|
|
%defattr(-,root,root)
|
- Update to lm_sensors 3.3.4
* Mostly a packaging-only clean-up, as we had backported most
important changes already.
* lm_sensors-r6111-detection-Winbond-W83627SF.diff,
lm_sensors-r6112-detection-AMD-family-16h.diff,
lm_sensors-r6113-ITE-IT877x-IT878x-driver.diff,
lm_sensors-r6117-detection-ITE-IT8752F.diff,
lm_sensors-r6123-AnalogDev-ADT7410-driver.diff,
lm_sensors-r6163-pwmconfig-raise-threshold.diff,
lm_sensors-r6164-pwmconfig-drop-comment.diff,
lm_sensors-r6165-pwmconfig-multiple-fans.diff,
lm_sensors-r6172-fancontrol-absolute-paths.diff: Removed,
upstream now.
* fancontrol.service: Removed, now provided by upstream,
together with sensord.service.
* lm_sensors-3.0.0-sysconfig_metadata.patch,
lm_sensors-3.0.3-hint-at-kernel-extra-package.patch: Refreshed.
- lm_sensors-r6181-fix-service-files.patch: Fix EnvironmentFile
in service files
OBS-URL: https://build.opensuse.org/package/show/Base:System/sensors?expand=0&rev=63
2013-06-03 12:54:44 +00:00
|
|
|
%{_unitdir}/sensord.service
|
2018-12-17 07:33:06 +00:00
|
|
|
%{_sbindir}/rcsensord
|
2017-11-24 10:01:27 +00:00
|
|
|
%{_fillupdir}/sysconfig.sensord
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_sbindir}/sensord
|
2014-01-28 11:59:07 +00:00
|
|
|
%dir %{_docdir}/sensord
|
2018-05-28 18:02:10 +00:00
|
|
|
%license %{_docdir}/sensord/COPYING
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man8/sensord.8%{?ext_man}
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%files -n libsensors4
|
2007-11-02 15:02:53 +00:00
|
|
|
%defattr(-,root,root)
|
2018-05-28 18:02:10 +00:00
|
|
|
%config %{_sysconfdir}/sensors3.conf
|
|
|
|
%config %{_sysconfdir}/sensors.d/
|
2018-12-16 12:24:05 +00:00
|
|
|
%{_libdir}/libsensors.so.4*
|
2014-01-28 11:59:07 +00:00
|
|
|
%dir %{_docdir}/sensors
|
2018-05-28 18:02:10 +00:00
|
|
|
%license %{_docdir}/sensors/COPYING.LGPL
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man5/*.5%{?ext_man}
|
2007-11-02 15:02:53 +00:00
|
|
|
|
2018-12-16 12:42:41 +00:00
|
|
|
%files -n libsensors4-devel
|
2007-11-02 15:02:53 +00:00
|
|
|
%defattr(-,root,root)
|
2018-05-28 18:02:10 +00:00
|
|
|
%{_includedir}/sensors/
|
2007-11-02 15:02:53 +00:00
|
|
|
%{_libdir}/libsensors.so
|
2014-01-28 11:59:07 +00:00
|
|
|
%dir %{_docdir}/sensors
|
|
|
|
%doc %{_docdir}/sensors/libsensors-API.txt
|
2018-12-16 11:30:36 +00:00
|
|
|
%{_mandir}/man3/*.3%{?ext_man}
|
2007-11-23 00:45:54 +00:00
|
|
|
|
2007-02-25 22:38:40 +00:00
|
|
|
%changelog
|