lm_sensors/lm_sensors.spec

247 lines
7.5 KiB
RPMSpec
Raw Normal View History

%define gitver %(echo %version | tr . -)
Name: lm_sensors
Version: 3.6.0
Release: 1mamba
Summary: Tools for monitoring the hardware health of Linux systems
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.lm-sensors.org/
Source: https://github.com/lm-sensors/lm-sensors.git/V%{gitver}/lm-sensors-%{version}.tar.bz2
#Source: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2
Patch0: lm_sensors-3.3.5-kernel-detect-openmamba.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libperl
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: libsystemd-devel
BuildRequires: libsysfs-devel >= 2.0.0
BuildRequires: flex
Requires(post): systemd-core
Requires: libsensors = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
%description
lm_sensors provides tools for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78 and LM75.
%package -n libsensors
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n libsensors
lm_sensors provides tools for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78 and LM75.
This package contains the shared library provided by %{name}.
%package -n libsensors-devel
Group: Development/Libraries
Summary: Static libraries and headers for %{name}
Requires: libsensors = %{?epoch:%epoch:}%{version}-%{release}
Conflicts: lm_sensors2-devel
Provides: lm_sensors-devel
Obsoletes: lm_sensors-devel
%description -n libsensors-devel
lm_sensors provides tools for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78 and LM75.
This package contains static libraries and header files need for development.
%prep
%setup -q -n lm-sensors-%{version}
%patch0 -p1
%build
%make user PREFIX=%{_prefix} MANDIR=%{_mandir} LIBDIR=%{_libdir}
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
make user_install MANDIR=%{_mandir} PREFIX=%{_prefix} DESTDIR=%{buildroot} LIBDIR=%{_libdir}
install -D -m 0644 prog/init/fancontrol.service %{buildroot}%{_unitdir}/fancontrol.service
install -D -m 0644 prog/init/lm_sensors.service %{buildroot}%{_unitdir}/lm_sensors.service
install -D -m 0644 prog/init/sensord.service %{buildroot}%{_unitdir}/sensord.service
#install -d %{buildroot}%{_sysconfdir}/sysconfig
#> %{buildroot}%{_sysconfdir}/sysconfig/lm_sensors
# remove installed kernel headers that will cause a conflict
rm -f %{buildroot}%{_includedir}/linux/*.h
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post -n libsensors
/sbin/ldconfig
:
%postun -n libsensors
/sbin/ldconfig
:
%preun
if [ $1 -eq 0 ]; then
systemctl -q stop lm_sensors
systemctl -q stop fancontrol
systemctl -q stop sensord
fi
:
%postun
if [ $1 -eq 0 ]; then
systemctl -q daemon-reload
fi
:
%posttrans
%ifnarch arm
# FIXME: produces a system crash on ARM build platform, disable until better tests are done
if [ $1 -ge 1 ]; then
# new install or upgrade
[ -e /proc/mounts ] && /usr/sbin/sensors-detect >/dev/null << _EOF
_EOF
systemctl -q daemon-reload
if [ -e %{_sysconfdir}/sysconfig/lm_sensors ]; then
systemctl -q enable lm_sensors
systemctl -q restart lm_sensors
fi
if [ -e %{_sysconfdir}/fancontrol ]; then
systemctl -q enable fancontrol
systemctl -q restart fancontrol
fi
if [ -e %{_sysconfdir}/sysconfig/sensorsd ]; then
systemctl -q enable sensord
systemctl -q restart sensord
fi
fi
%endif
:
%files
%defattr(-,root,root)
%{_bindir}/*
%{_sbindir}/*
%config(noreplace) %{_sysconfdir}/sensors3.conf
#%ghost %{_sysconfdir}/sysconfig/lm_sensors
%{_unitdir}/fancontrol.service
%{_unitdir}/lm_sensors.service
%{_unitdir}/sensord.service
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%files -n libsensors
%defattr(-,root,root)
%{_libdir}/libsensors.so.*
%doc COPYING
%files -n libsensors-devel
%defattr(-,root,root)
%{_libdir}/libsensors.so
%{_libdir}/libsensors.a
%dir %{_includedir}/sensors
%{_includedir}/sensors/*.h
%{_mandir}/man3/*
%doc CHANGES CONTRIBUTORS README
%changelog
* Tue Oct 22 2019 Automatic Build System <autodist@mambasoft.it> 3.6.0-1mamba
- automatic version update by autodist
* Fri Aug 02 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 3.5.0-1mamba
- update to 3.5.0
* Sat Dec 02 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-2mamba
- move libsensors to its own library subpackage
* Sun Jul 05 2015 Automatic Build System <autodist@mambasoft.it> 3.4.0-1mamba
- automatic update by autodist
* Sat Nov 22 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.5-3mamba
- fix permissions of service files
* Tue Jun 10 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.5-2mamba
- sensors-detect: added patch to correctly detect kernel version
- switch to systemd support
* Sun Feb 02 2014 Automatic Build System <autodist@mambasoft.it> 3.3.5-1mamba
- automatic version update by autodist
* Wed May 29 2013 Automatic Build System <autodist@mambasoft.it> 3.3.4-1mamba
- automatic version update by autodist
* Mon Nov 12 2012 Automatic Build System <autodist@mambasoft.it> 3.3.3-1mamba
- automatic version update by autodist
* Wed Jul 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.2-1mamba
- update to 3.3.2
* Fri Jan 06 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.1-2mamba
- added patch for kernel >=3.0
* Mon Jul 25 2011 Automatic Build System <autodist@mambasoft.it> 3.3.1-1mamba
- automatic version update by autodist
* Tue Mar 29 2011 Automatic Build System <autodist@mambasoft.it> 3.3.0-1mamba
- automatic update by autodist
* Sat Oct 16 2010 Automatic Build System <autodist@mambasoft.it> 3.2.0-1mamba
- automatic update by autodist
* Tue Feb 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.2-2mamba
- post script: specify full path of sensors-detect to fix installation with makedist
* Fri Feb 05 2010 Automatic Build System <autodist@mambasoft.it> 3.1.2-1mamba
- automatic update by autodist
* Mon Jun 29 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.1-1mamba
- update to 3.1.1
* Sun Mar 08 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.0-1mamba
- automatic update by autodist
* Mon Jan 05 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.3-1mamba
- update to 3.0.3
* Tue May 29 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.10.3-1mamba
- update to 2.10.3
* Wed Jun 28 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 2.10.0-1qilnx
- update to version 2.10.0 by autospec
* Tue Dec 20 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.9.2-2qilnx
- sensors-detect requires /proc/mounts
- added %%ghost file %{_sysconfdir}/sysconfig/lm_sensors
* Tue Sep 27 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.2-1qilnx
- update to version 2.9.2 by autospec
- CAN-2005-2672 vulnerability fixed upstream, patch removed
* Tue Aug 30 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.9.1-1qilnx
- update to version 2.9.1 by autospec
* Fri Aug 26 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.9.0-3qilnx
- pwmconfig: do not create temporary files in an insecure manner
(QSA-2005-094: CAN-2005-2672)
* Thu Feb 17 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.0-2qilnx
- removed conflict headers in devel package
- run sensors-detect on install/upgrade
* Thu Feb 17 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.0-1qilnx
- package created by autospec