Name: thinkfan
Version: 0.9.3
Release: 2%{?dist}
Summary: A simple fan control program
License: GPLv3+
URL: https://github.com/vmatare/thinkfan
Source0: https://github.com/vmatare/thinkfan/archive/%{version}/%{name}-%{version}.tar.gz
Source1: thinkfan.modprobe
Source2: thinkfan.service
Source3: thinkfan.sysconfig
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: systemd-units
BuildRequires: libatasmart-devel
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
A simple fan control program. Works with any Linux hwmon driver, especially
with thinkpad_acpi. It is designed to eat as little CPU power as possible.
%prep
%setup -q
# Workaround incorrectly placed file
mv src/thinkfan.1 .
%build
%{cmake} -DUSE_ATASMART:BOOL=ON
make %{?_smp_mflags}
%install
%make_install
# Install unit file
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_unitdir}/thinkfan.service
# Install sysconfig
install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/thinkfan
# Install configuration file
install -Dpm 0644 examples/thinkfan.conf.simple %{buildroot}%{_sysconfdir}/thinkfan.conf
# Install modprobe configuration file
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/modprobe.d/thinkfan.conf
# Installed through %%license
rm -f %{buildroot}/%{_pkgdocdir}/COPYING
%post
%systemd_post thinkfan.service
%preun
%systemd_preun thinkfan.service
%postun
%systemd_postun_with_restart thinkfan.service
%files
%license COPYING
%doc README NEWS
%doc %{_pkgdocdir}/thinkfan.conf.*
%{_sbindir}/thinkfan
%{_unitdir}/thinkfan.service
%config(noreplace) %{_sysconfdir}/sysconfig/thinkfan
%config(noreplace) %{_sysconfdir}/thinkfan.conf
%config(noreplace) %{_sysconfdir}/modprobe.d/thinkfan.conf
%{_mandir}/man1/thinkfan.1.*
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri May 06 2016 Sandro Mani <manisandro@gmail.com> - 0.9.3-1
- Update to 0.9.3
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 08 2015 Sandro Mani <manisandro@gmail.com> - 0.9.2-6
- Add patch for #1247034: setfan_ibm: Error writing to /proc/acpi/ibm/fan: Invalid argument
* Mon Oct 26 2015 Sandro Mani <manisandro@gmail.com> - 0.9.2-5
- Fix incorrectly installed sysconfig file
* Wed Oct 21 2015 Sandro Mani <manisandro@gmail.com> - 0.9.2-4
- Install sysconfig file (#1189976)
- Modernize spec
* Fri Oct 09 2015 Matt Spaulding <mspaulding06@gmail.com> - 0.9.2-3
- Add libatasmart support (RHBZ#1243367)
- Add config files to docs
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Dec 07 2014 Matt Spaulding <mspaulding06@gmail.com> - 0.9.2-1
- Update to latest upstream version
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 17 2013 Matt Spaulding <mspaulding06@gmail.com> - 0.8.1-5
- Fixed empty man pages
- Fixed config in wrong location (RHBZ#998110)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Oct 01 2012 Matt Spaulding <mspaulding06@gmail.com> - 0.8.1-2
- Fixed license type
- Fixed manpages entry in files section
* Sat Sep 29 2012 Matt Spaulding <mspaulding06@gmail.com> - 0.8.1-1
- Initial packaging