Blame SPECS/thermald.spec

74b3d8
# Explicitly turn on hardening, if required.
74b3d8
%if 0%{?rhel} && 0%{?rhel} <= 7
74b3d8
%global _hardened_build 1
74b3d8
%endif
74b3d8
74b3d8
%global pkgname thermal_daemon
74b3d8
74b3d8
74b3d8
Name:		thermald
aaf335
Version:	2.5.2
aaf335
Release:	1%{?dist}
74b3d8
Summary:	Thermal Management daemon
74b3d8
74b3d8
# thd_cdev_modem.{cpp,h} is currently GPLv2 only
74b3d8
# https://github.com/intel/thermal_daemon/issues/306
74b3d8
License:	GPLv2
74b3d8
URL:		https://github.com/intel/%{pkgname}
74b3d8
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
74b3d8
74b3d8
# No cpuid.h on other arches.
74b3d8
ExclusiveArch:	%{ix86} x86_64
74b3d8
74b3d8
BuildRequires: make
74b3d8
BuildRequires:	autoconf autoconf-archive
74b3d8
BuildRequires:	automake
74b3d8
BuildRequires:	dbus-glib-devel
74b3d8
BuildRequires:	desktop-file-utils
74b3d8
BuildRequires:	gcc-c++
74b3d8
BuildRequires:	libxml2-devel
74b3d8
BuildRequires:	systemd-devel
74b3d8
BuildRequires:  upower-devel
74b3d8
BuildRequires:  libevdev-devel
74b3d8
BuildRequires:  gtk-doc
74b3d8
74b3d8
Requires:	dbus%{?_isa}
74b3d8
74b3d8
Requires(pre):	glibc-common
74b3d8
Requires(pre):	shadow-utils
74b3d8
74b3d8
%{?systemd_requires}
74b3d8
b13c52
# Upstream removed the internal copy of qcustomplot, add it back as we don't have it in RHEL.
b13c52
# The alternative would be removing the GUI package
b13c52
Patch9000:      qcustomplot.patch
b13c52
74b3d8
%description
74b3d8
%{name} monitors and controls platform temperature.
74b3d8
74b3d8
Thermal issues are important to handle proactively to reduce performance
74b3d8
impact.  %{name} uses the existing Linux kernel infrastructure and can
74b3d8
be easily enhanced.
74b3d8
74b3d8
74b3d8
%package monitor
74b3d8
Summary:	Application for monitoring %{name}
74b3d8
License:	GPLv3+
74b3d8
74b3d8
BuildRequires:	qt5-qtbase-devel
74b3d8
74b3d8
Requires:	hicolor-icon-theme
74b3d8
Requires:	%{name}%{?_isa}		== %{version}-%{release}
74b3d8
74b3d8
Provides:	bundled(qcustomplot) = 2.0.0-beta
74b3d8
74b3d8
%description monitor
74b3d8
This package contains an Application to monitor %{name} for system
74b3d8
developers who want to enable application developers and their
74b3d8
customers with the responsive and flexible thermal management,
74b3d8
supporting optimal performance in desktop, clam-shell, mobile and
74b3d8
embedded devices.
74b3d8
74b3d8
74b3d8
%prep
74b3d8
%autosetup -n %{pkgname}-%{version} -p 1
74b3d8
74b3d8
# Create tmpfiles.d config.
74b3d8
%{__mkdir} -p fedora_addons
74b3d8
%{__cat} << EOF > fedora_addons/%{name}.conf
74b3d8
d %{_rundir}/%{name} 0755 root root -
74b3d8
EOF
74b3d8
74b3d8
# Create desktop-file for the monitor-app.
74b3d8
%{__cat} << EOF > fedora_addons/%{name}-monitor.desktop
74b3d8
[Desktop Entry]
74b3d8
Name=%{name} Monitor
74b3d8
Comment=Application for monitoring %{name}
74b3d8
Icon=%{name}-monitor
74b3d8
Categories=System;Settings;
74b3d8
Exec=%{_bindir}/ThermalMonitor
74b3d8
Type=Application
74b3d8
StartupNotify=true
74b3d8
Terminal=false
74b3d8
EOF
74b3d8
74b3d8
# Create icon for the monitor-app.
74b3d8
%{__cat} << EOF > fedora_addons/%{name}-monitor.svg
74b3d8
74b3d8
74b3d8
	 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
74b3d8
74b3d8
	C17.68,321.732,10.894,289.661,10.894,256C10.894,120.636,120.636,10.894,256,10.894S501.106,120.636,501.106,256z"/>
74b3d8
74b3d8
	c0-18.802-7.626-35.818-19.935-48.15l75.101-75.101C410.783,164.298,430.294,207.872,430.294,256z"/>
74b3d8
74b3d8
	c-73.826,0-136.933-45.895-162.337-110.723C85.935,299.879,81.698,278.43,81.698,256c0-96.256,78.042-174.298,174.298-174.298
74b3d8
	c48.128,0,91.702,19.51,123.25,51.047l-75.101,75.101c12.31,12.332,19.935,29.347,19.935,48.15c0,5.588-0.686,11.013-1.95,16.21
74b3d8
	L418.332,319.564z"/>
74b3d8
74b3d8
	l63.706-31.352l96.212-47.365c-1.264-5.196-1.961-10.621-1.961-16.21c0-37.605,30.491-68.085,68.085-68.085
74b3d8
	c18.802,0,35.818,7.626,48.15,19.935c12.31,12.332,19.935,29.347,19.935,48.15c0,5.588-0.686,11.013-1.95,16.21l96.202,47.355
74b3d8
	L482.038,350.927z"/>
74b3d8
<circle style="fill:#EFEFEF;" cx="256" cy="256" r="21.787"/>
74b3d8
<g>
74b3d8
	
74b3d8
		c1.895,3.851,5.762,6.085,9.781,6.085c1.614,0,3.255-0.362,4.802-1.122l77.373-38.087c5.398-2.657,7.62-9.187,4.963-14.584
74b3d8
		C203.495,307.369,196.965,305.147,191.566,307.802z"/>
74b3d8
	
74b3d8
		c26.031-11.098,49.226-27.021,68.936-47.325c4.192-4.316,4.088-11.213-0.228-15.405c-4.317-4.19-11.213-4.087-15.405,0.229
74b3d8
		c-36.133,37.22-84.715,57.719-136.799,57.719C249.985,446.638,245.106,451.515,245.106,457.532z"/>
74b3d8
	
74b3d8
		c3.403-4.961,2.142-11.742-2.82-15.145c-4.958-3.403-11.74-2.142-15.145,2.819l-0.15,0.219
74b3d8
		C409.708,369.076,410.969,375.856,415.931,379.26z"/>
74b3d8
	
74b3d8
		S237.98,288.683,256,288.683S288.681,274.022,288.681,256.002z M245.106,256.002c0-6.007,4.887-10.894,10.894-10.894
74b3d8
		c6.007,0,10.894,4.887,10.894,10.894c0,6.007-4.887,10.894-10.894,10.894C249.993,266.896,245.106,262.009,245.106,256.002z"/>
74b3d8
	
74b3d8
		C187.622,0,123.335,26.629,74.982,74.983C26.629,123.335,0,187.622,0,256c0,34.321,6.685,67.638,19.868,99.032
74b3d8
		c0.015,0.039,0.026,0.078,0.042,0.118C59.97,450.433,152.639,512,255.996,512s196.025-61.567,236.085-156.851
74b3d8
		c0,0,0-0.001,0.001-0.002l0.002,0.003C505.299,323.726,512,290.367,512,256z M255.996,490.213
74b3d8
		c-91.135,0-173.186-52.313-211.823-134.142l150.511-74.087c4.58-2.255,6.98-7.387,5.774-12.348
74b3d8
		c-1.097-4.507-1.653-9.095-1.653-13.636c0-31.536,25.657-57.191,57.191-57.191c15.265,0,29.632,5.949,40.44,16.738
74b3d8
		c10.802,10.822,16.751,25.188,16.751,40.453c0,4.57-0.552,9.157-1.642,13.636c-1.206,4.961,1.194,10.094,5.775,12.348
74b3d8
		l150.499,74.086C429.182,437.898,347.131,490.213,255.996,490.213z M92.591,256c0-90.101,73.303-163.404,163.404-163.404
74b3d8
		c39.988,0,77.792,14.274,107.592,40.406l-59.981,59.984c-13.652-10.349-30.203-15.964-47.611-15.964
74b3d8
		c-43.549,0-78.979,35.429-78.979,78.979c0,3.354,0.218,6.721,0.651,10.076l-77.795,38.292
74b3d8
		C95.042,288.781,92.591,272.563,92.591,256z M378.993,148.407C405.126,178.206,419.4,216.011,419.4,256
74b3d8
		c0,16.559-2.443,32.779-7.276,48.367l0.001,0.002l-77.797-38.297c0.43-3.344,0.646-6.712,0.646-10.072
74b3d8
		c0-17.413-5.618-33.97-15.981-47.631l0.031,0.01L378.993,148.407z M431.875,314.091c6.176-18.676,9.312-38.169,9.312-58.091
74b3d8
		c0-45.811-16.535-89.081-46.766-123.018l5.449-5.448c4.254-4.254,4.254-11.152,0-15.406c-4.253-4.254-11.149-4.254-15.407,0
74b3d8
		l-5.449,5.449c-33.938-30.232-77.207-46.768-123.018-46.768C153.881,70.809,70.804,153.885,70.804,256
74b3d8
		c0,19.926,3.134,39.421,9.309,58.095L35.774,335.92c-9.286-25.546-13.986-52.377-13.986-79.92
74b3d8
		C21.787,126.855,126.854,21.787,256,21.787S490.213,126.855,490.213,256c0,27.547-4.701,54.378-13.987,79.922l0.002,0.003
74b3d8
		L431.875,314.091z"/>
74b3d8
</g>
74b3d8
</svg>
74b3d8
EOF
74b3d8
74b3d8
# Create ReadMe.txt for the monitor-app.
74b3d8
%{__cat} << EOF > fedora_addons/%{name}-monitor.ReadMe.txt
74b3d8
Running the thermald-monitor-app
74b3d8
--------------------------------
74b3d8
74b3d8
To communicate with thermald via dbus, the user has to be member
74b3d8
of the "power" group.  So make sure to add your user id to this
74b3d8
group before using the thermald-monitor-app.
74b3d8
EOF
74b3d8
74b3d8
NO_CONFIGURE=1 ./autogen.sh
74b3d8
74b3d8
74b3d8
%build
74b3d8
%configure									\
74b3d8
	--disable-option-checking						\
74b3d8
	--disable-silent-rules
74b3d8
74b3d8
%make_build
74b3d8
74b3d8
# Build the monitor-app.
74b3d8
pushd tools/thermal_monitor
74b3d8
%{__mkdir} -p %{_target_platform}
74b3d8
pushd %{_target_platform}
74b3d8
%{qmake_qt5} ..
74b3d8
%make_build
74b3d8
popd
74b3d8
popd
74b3d8
74b3d8
74b3d8
%install
74b3d8
%make_install
74b3d8
74b3d8
# Install management-script.
74b3d8
%{__install} -Dpm 0755 tools/thermald_set_pref.sh				\
74b3d8
	%{buildroot}%{_bindir}/%{name}-set-pref
74b3d8
74b3d8
# DBus config belongs into %%{_datadir}.
74b3d8
%{__mkdir} -p %{buildroot}%{_datadir}
74b3d8
%{__mv} -f %{buildroot}%{_sysconfdir}/dbus-1/* %{buildroot}%{_datadir}/dbus-1/
74b3d8
74b3d8
# No Upstart.
74b3d8
%{__rm} -fr %{buildroot}%{_sysconfdir}/init
74b3d8
74b3d8
# Setup tmpfiles.d
74b3d8
%{__install} -Dpm 0644 fedora_addons/%{name}.conf				\
74b3d8
	%{buildroot}%{_tmpfilesdir}/%{name}.conf
74b3d8
%{__install} -dm 0755 %{buildroot}%{_rundir}/%{name}
74b3d8
/bin/echo "%{name}_pid" > %{buildroot}%{_rundir}/%{name}/%{name}.pid
74b3d8
%{__chmod} -c 0644 %{buildroot}%{_rundir}/%{name}/%{name}.pid
74b3d8
74b3d8
# Install the monitor-app.
74b3d8
%{__install} -Dpm 0755 tools/thermal_monitor/%{_target_platform}/ThermalMonitor	\
74b3d8
	%{buildroot}%{_bindir}/ThermalMonitor
74b3d8
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.desktop			\
74b3d8
	%{buildroot}%{_datadir}/applications/%{name}-monitor.desktop
74b3d8
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.svg			\
74b3d8
	%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg
74b3d8
74b3d8
74b3d8
%check
74b3d8
%{_bindir}/desktop-file-validate						\
74b3d8
	%{buildroot}%{_datadir}/applications/*.desktop
74b3d8
74b3d8
74b3d8
%pre
74b3d8
/bin/getent group power >/dev/null || /sbin/groupadd -r power
74b3d8
exit 0
74b3d8
74b3d8
74b3d8
%post
74b3d8
%systemd_post thermald.service
74b3d8
74b3d8
74b3d8
%preun
74b3d8
%systemd_preun thermald.service
74b3d8
74b3d8
74b3d8
%postun
74b3d8
%systemd_postun_with_restart thermald.service
74b3d8
74b3d8
%files
74b3d8
%config(noreplace) %{_sysconfdir}/%{name}
74b3d8
%doc README.txt thermal_daemon_usage.txt
74b3d8
%ghost %dir %{_rundir}/%{name}
74b3d8
%ghost %{_rundir}/%{name}/%{name}.pid
74b3d8
%license COPYING
74b3d8
%{_bindir}/%{name}-set-pref
74b3d8
%{_datadir}/dbus-1/system-services/org.freedesktop.%{name}.service
74b3d8
%{_datadir}/dbus-1/system.d/org.freedesktop.%{name}.conf
74b3d8
%{_mandir}/man5/thermal-conf.xml.5*
74b3d8
%{_mandir}/man8/%{name}.8*
74b3d8
%{_sbindir}/%{name}
74b3d8
%{_tmpfilesdir}/%{name}.conf
74b3d8
%{_unitdir}/%{name}.service
74b3d8
74b3d8
74b3d8
%files monitor
74b3d8
%doc fedora_addons/%{name}-monitor.ReadMe.txt
74b3d8
%license tools/thermal_monitor/qcustomplot/GPL.txt
74b3d8
%{_bindir}/ThermalMonitor
74b3d8
%{_datadir}/applications/%{name}-monitor.desktop
74b3d8
%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg
74b3d8
74b3d8
74b3d8
%changelog
aaf335
* Thu Feb 23 2023 Bastien Nocera <bnocera@redhat.com> - 2.5.2-1
aaf335
- Update to 2.5.2
aaf335
Resolves: rhbz#2172590
aaf335
aaf335
* Mon Dec 19 2022 Bastien Nocera <bnocera@redhat.com> - 2.5.1-1
aaf335
- Update to 2.5.1
aaf335
Resolves: rhbz#2114049
aaf335
b13c52
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-3
b13c52
- Accept 2.5 as package version
b13c52
  Related: #2040081
b13c52
b13c52
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-2
b13c52
- Fix version test script
b13c52
  Related: #2040081
b13c52
b13c52
* Fri Jul 22 2022 Benjamin Berg <bberg@redhat.com> - 2.5-1
b13c52
- Update to 2.5
b13c52
  Resolves: #2040081
b13c52
74b3d8
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.6-2
74b3d8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
74b3d8
  Related: rhbz#1991688
74b3d8
74b3d8
* Thu Jun 10 2021 Benjamin Berg <bberg@redhat.com> - 2.4.6-1
74b3d8
- Update to 2.4.6 (#1965783)
74b3d8
- Update main license to GPLv2 only for now
74b3d8
- Add bundled(qcustomplot) for monitor subpackage
74b3d8
- Resolves: #1961047
74b3d8
74b3d8
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.1-4
74b3d8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
74b3d8
74b3d8
* Tue Feb 02 2021 Benjamin Berg <bberg@redhat.com> - 2.4.1-3
74b3d8
- Add upstream patch fixing parsing of passive targets
74b3d8
74b3d8
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
74b3d8
74b3d8
* Tue Dec 01 2020 Benjamin Berg <bberg@redhat.com> - 2.4.1-1
74b3d8
- New upstream release (#1903094)
74b3d8
74b3d8
* Thu Nov 26 2020 Benjamin Berg <bberg@redhat.com> - 2.4-1
74b3d8
- New upstream release (#1901810)
74b3d8
  Resolves: #1894178
74b3d8
  Resolves: #1892534
74b3d8
74b3d8
* Tue Sep 01 2020 Benjamin Berg <bberg@redhat.com> - 2.3-2
74b3d8
- Fix Lenovo kill switch (#1874462)
74b3d8
74b3d8
* Tue Aug 25 2020 Benjamin Berg <bberg@redhat.com> - 2.3-1
74b3d8
- New upstream release 2.3 (rhbz#1866784)
74b3d8
- Add patch to fix printf on non-64 bit
74b3d8
74b3d8
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
74b3d8
74b3d8
* Mon Jun 08 2020 Benjamin Berg <bberg@redhat.com> - 2.2-1
74b3d8
- New upstream release 2.2 (rhbz#1827883)
74b3d8
74b3d8
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
74b3d8
74b3d8
* Wed Dec 18 2019 Benjamin Berg <bberg@redhat.com> - 1.9.1-1
74b3d8
- New upstream release 1.9 (rhbz#1782249)
74b3d8
- Drop Patch0, it has been merged upstream
74b3d8
74b3d8
* Fri Sep 20 2019 Christian Kellner <ckellner@redhat.com> - 1.9-1
74b3d8
- New upstream release 1.9 (rhbz#1742290)
74b3d8
- Update patch0 (taken from upstream, commit dcdaf52...)
74b3d8
74b3d8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
74b3d8
74b3d8
* Fri May 17 2019 Benjamin Berg <bberg@redhat.com> - 1.8-2
74b3d8
- Fix build on i686
74b3d8
74b3d8
* Fri May 17 2019 Benjamin Berg <bberg@redhat.com> - 1.8-1
74b3d8
- New upstream release (#1582506)
74b3d8
74b3d8
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-4
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
74b3d8
74b3d8
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-3
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
74b3d8
74b3d8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
74b3d8
74b3d8
* Thu Dec 28 2017 Björn Esser <besser82@fedoraproject.org> - 1.7.1-1
74b3d8
- New upstream release (#1505144)
74b3d8
74b3d8
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
74b3d8
74b3d8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-7
74b3d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
74b3d8
74b3d8
* Sat Jul 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-6
74b3d8
- Add upstreamed patch to silence compiler warnings
74b3d8
74b3d8
* Sat Jul 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-5
74b3d8
- Replace fix for rhbz#1464548 from upstream commit
74b3d8
- Add upstream patch to fix README
74b3d8
74b3d8
* Fri Jun 30 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-4
74b3d8
- Add upstream patch to fix ThermalMonitor (rhbz#1464548)
74b3d8
- Add several fixes from upstream
74b3d8
74b3d8
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-3
74b3d8
- Explicitly turn on hardening, if required
74b3d8
74b3d8
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-2
74b3d8
- Fix missing trailing semicolon in desktop-file
74b3d8
74b3d8
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-1
74b3d8
- Initial import (rhbz#1440406)
74b3d8
74b3d8
* Mon Apr 10 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.4
74b3d8
- Use qmake_qt5-macro and build out of tree
74b3d8
74b3d8
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.3
74b3d8
- Small packaging improvements
74b3d8
74b3d8
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.2
74b3d8
- Add management-script
74b3d8
74b3d8
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.1
74b3d8
- Initial rpm-release (rhbz#1440406)