Blame SPECS/thermald.spec

f7ca3d
# Explicitly turn on hardening, if required.
f7ca3d
%if 0%{?rhel} && 0%{?rhel} <= 7
f7ca3d
%global _hardened_build 1
f7ca3d
%endif
f7ca3d
f7ca3d
%global pkgname thermal_daemon
f7ca3d
f7ca3d
f7ca3d
Name:		thermald
6a48a9
Version:	2.5.1
6a48a9
Release:	1%{?dist}
f7ca3d
Summary:	Thermal Management daemon
f7ca3d
f7ca3d
# thd_cdev_modem.{cpp,h} is currently GPLv2 only
f7ca3d
# https://github.com/intel/thermal_daemon/issues/306
f7ca3d
License:	GPLv2
f7ca3d
URL:		https://github.com/intel/%{pkgname}
f7ca3d
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
f7ca3d
f7ca3d
# No cpuid.h on other arches.
f7ca3d
ExclusiveArch:	%{ix86} x86_64
f7ca3d
f7ca3d
BuildRequires: make
f7ca3d
BuildRequires:	autoconf autoconf-archive
f7ca3d
BuildRequires:	automake
f7ca3d
BuildRequires:	dbus-glib-devel
f7ca3d
BuildRequires:	desktop-file-utils
f7ca3d
BuildRequires:	gcc-c++
f7ca3d
BuildRequires:	libxml2-devel
f7ca3d
BuildRequires:	systemd-devel
f7ca3d
BuildRequires:  upower-devel
f7ca3d
BuildRequires:  libevdev-devel
f7ca3d
BuildRequires:  gtk-doc
f7ca3d
f7ca3d
Requires:	dbus%{?_isa}
f7ca3d
f7ca3d
Requires(pre):	glibc-common
f7ca3d
Requires(pre):	shadow-utils
f7ca3d
f7ca3d
%{?systemd_requires}
f7ca3d
237c9c
# Upstream removed the internal copy of qcustomplot, add it back as we don't have it in RHEL.
237c9c
# The alternative would be removing the GUI package
237c9c
Patch9000:      qcustomplot.patch
237c9c
f7ca3d
%description
f7ca3d
%{name} monitors and controls platform temperature.
f7ca3d
f7ca3d
Thermal issues are important to handle proactively to reduce performance
f7ca3d
impact.  %{name} uses the existing Linux kernel infrastructure and can
f7ca3d
be easily enhanced.
f7ca3d
f7ca3d
f7ca3d
%package monitor
f7ca3d
Summary:	Application for monitoring %{name}
f7ca3d
License:	GPLv3+
f7ca3d
f7ca3d
BuildRequires:	qt5-qtbase-devel
f7ca3d
f7ca3d
Requires:	hicolor-icon-theme
f7ca3d
Requires:	%{name}%{?_isa}		== %{version}-%{release}
f7ca3d
f7ca3d
Provides:	bundled(qcustomplot) = 2.0.0-beta
f7ca3d
f7ca3d
%description monitor
f7ca3d
This package contains an Application to monitor %{name} for system
f7ca3d
developers who want to enable application developers and their
f7ca3d
customers with the responsive and flexible thermal management,
f7ca3d
supporting optimal performance in desktop, clam-shell, mobile and
f7ca3d
embedded devices.
f7ca3d
f7ca3d
f7ca3d
%prep
f7ca3d
%autosetup -n %{pkgname}-%{version} -p 1
f7ca3d
f7ca3d
# Create tmpfiles.d config.
f7ca3d
%{__mkdir} -p fedora_addons
f7ca3d
%{__cat} << EOF > fedora_addons/%{name}.conf
f7ca3d
d %{_rundir}/%{name} 0755 root root -
f7ca3d
EOF
f7ca3d
f7ca3d
# Create desktop-file for the monitor-app.
f7ca3d
%{__cat} << EOF > fedora_addons/%{name}-monitor.desktop
f7ca3d
[Desktop Entry]
f7ca3d
Name=%{name} Monitor
f7ca3d
Comment=Application for monitoring %{name}
f7ca3d
Icon=%{name}-monitor
f7ca3d
Categories=System;Settings;
f7ca3d
Exec=%{_bindir}/ThermalMonitor
f7ca3d
Type=Application
f7ca3d
StartupNotify=true
f7ca3d
Terminal=false
f7ca3d
EOF
f7ca3d
f7ca3d
# Create icon for the monitor-app.
f7ca3d
%{__cat} << EOF > fedora_addons/%{name}-monitor.svg
f7ca3d
f7ca3d
f7ca3d
	 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
f7ca3d
f7ca3d
	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"/>
f7ca3d
f7ca3d
	c0-18.802-7.626-35.818-19.935-48.15l75.101-75.101C410.783,164.298,430.294,207.872,430.294,256z"/>
f7ca3d
f7ca3d
	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
f7ca3d
	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
f7ca3d
	L418.332,319.564z"/>
f7ca3d
f7ca3d
	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
f7ca3d
	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
f7ca3d
	L482.038,350.927z"/>
f7ca3d
<circle style="fill:#EFEFEF;" cx="256" cy="256" r="21.787"/>
f7ca3d
<g>
f7ca3d
	
f7ca3d
		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
f7ca3d
		C203.495,307.369,196.965,305.147,191.566,307.802z"/>
f7ca3d
	
f7ca3d
		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
f7ca3d
		c-36.133,37.22-84.715,57.719-136.799,57.719C249.985,446.638,245.106,451.515,245.106,457.532z"/>
f7ca3d
	
f7ca3d
		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
f7ca3d
		C409.708,369.076,410.969,375.856,415.931,379.26z"/>
f7ca3d
	
f7ca3d
		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
f7ca3d
		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"/>
f7ca3d
	
f7ca3d
		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
f7ca3d
		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
f7ca3d
		c0,0,0-0.001,0.001-0.002l0.002,0.003C505.299,323.726,512,290.367,512,256z M255.996,490.213
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		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
f7ca3d
		L431.875,314.091z"/>
f7ca3d
</g>
f7ca3d
</svg>
f7ca3d
EOF
f7ca3d
f7ca3d
# Create ReadMe.txt for the monitor-app.
f7ca3d
%{__cat} << EOF > fedora_addons/%{name}-monitor.ReadMe.txt
f7ca3d
Running the thermald-monitor-app
f7ca3d
--------------------------------
f7ca3d
f7ca3d
To communicate with thermald via dbus, the user has to be member
f7ca3d
of the "power" group.  So make sure to add your user id to this
f7ca3d
group before using the thermald-monitor-app.
f7ca3d
EOF
f7ca3d
f7ca3d
NO_CONFIGURE=1 ./autogen.sh
f7ca3d
f7ca3d
f7ca3d
%build
f7ca3d
%configure									\
f7ca3d
	--disable-option-checking						\
f7ca3d
	--disable-silent-rules
f7ca3d
f7ca3d
%make_build
f7ca3d
f7ca3d
# Build the monitor-app.
f7ca3d
pushd tools/thermal_monitor
f7ca3d
%{__mkdir} -p %{_target_platform}
f7ca3d
pushd %{_target_platform}
f7ca3d
%{qmake_qt5} ..
f7ca3d
%make_build
f7ca3d
popd
f7ca3d
popd
f7ca3d
f7ca3d
f7ca3d
%install
f7ca3d
%make_install
f7ca3d
f7ca3d
# Install management-script.
f7ca3d
%{__install} -Dpm 0755 tools/thermald_set_pref.sh				\
f7ca3d
	%{buildroot}%{_bindir}/%{name}-set-pref
f7ca3d
f7ca3d
# DBus config belongs into %%{_datadir}.
f7ca3d
%{__mkdir} -p %{buildroot}%{_datadir}
f7ca3d
%{__mv} -f %{buildroot}%{_sysconfdir}/dbus-1/* %{buildroot}%{_datadir}/dbus-1/
f7ca3d
f7ca3d
# No Upstart.
f7ca3d
%{__rm} -fr %{buildroot}%{_sysconfdir}/init
f7ca3d
f7ca3d
# Setup tmpfiles.d
f7ca3d
%{__install} -Dpm 0644 fedora_addons/%{name}.conf				\
f7ca3d
	%{buildroot}%{_tmpfilesdir}/%{name}.conf
f7ca3d
%{__install} -dm 0755 %{buildroot}%{_rundir}/%{name}
f7ca3d
/bin/echo "%{name}_pid" > %{buildroot}%{_rundir}/%{name}/%{name}.pid
f7ca3d
%{__chmod} -c 0644 %{buildroot}%{_rundir}/%{name}/%{name}.pid
f7ca3d
f7ca3d
# Install the monitor-app.
f7ca3d
%{__install} -Dpm 0755 tools/thermal_monitor/%{_target_platform}/ThermalMonitor	\
f7ca3d
	%{buildroot}%{_bindir}/ThermalMonitor
f7ca3d
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.desktop			\
f7ca3d
	%{buildroot}%{_datadir}/applications/%{name}-monitor.desktop
f7ca3d
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.svg			\
f7ca3d
	%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg
f7ca3d
f7ca3d
f7ca3d
%check
f7ca3d
%{_bindir}/desktop-file-validate						\
f7ca3d
	%{buildroot}%{_datadir}/applications/*.desktop
f7ca3d
f7ca3d
f7ca3d
%pre
f7ca3d
/bin/getent group power >/dev/null || /sbin/groupadd -r power
f7ca3d
exit 0
f7ca3d
f7ca3d
f7ca3d
%post
f7ca3d
%systemd_post thermald.service
f7ca3d
f7ca3d
f7ca3d
%preun
f7ca3d
%systemd_preun thermald.service
f7ca3d
f7ca3d
f7ca3d
%postun
f7ca3d
%systemd_postun_with_restart thermald.service
f7ca3d
f7ca3d
%files
f7ca3d
%config(noreplace) %{_sysconfdir}/%{name}
f7ca3d
%doc README.txt thermal_daemon_usage.txt
f7ca3d
%ghost %dir %{_rundir}/%{name}
f7ca3d
%ghost %{_rundir}/%{name}/%{name}.pid
f7ca3d
%license COPYING
f7ca3d
%{_bindir}/%{name}-set-pref
f7ca3d
%{_datadir}/dbus-1/system-services/org.freedesktop.%{name}.service
f7ca3d
%{_datadir}/dbus-1/system.d/org.freedesktop.%{name}.conf
f7ca3d
%{_mandir}/man5/thermal-conf.xml.5*
f7ca3d
%{_mandir}/man8/%{name}.8*
f7ca3d
%{_sbindir}/%{name}
f7ca3d
%{_tmpfilesdir}/%{name}.conf
f7ca3d
%{_unitdir}/%{name}.service
f7ca3d
f7ca3d
f7ca3d
%files monitor
f7ca3d
%doc fedora_addons/%{name}-monitor.ReadMe.txt
f7ca3d
%license tools/thermal_monitor/qcustomplot/GPL.txt
f7ca3d
%{_bindir}/ThermalMonitor
f7ca3d
%{_datadir}/applications/%{name}-monitor.desktop
f7ca3d
%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg
f7ca3d
f7ca3d
f7ca3d
%changelog
6a48a9
* Mon Dec 19 2022 Bastien Nocera <bnocera@redhat.com> - 2.5.1-1
6a48a9
- Update to 2.5.1
6a48a9
Resolves: rhbz#2114049
6a48a9
237c9c
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-3
237c9c
- Accept 2.5 as package version
237c9c
  Related: #2040081
237c9c
237c9c
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-2
237c9c
- Fix version test script
237c9c
  Related: #2040081
237c9c
237c9c
* Fri Jul 22 2022 Benjamin Berg <bberg@redhat.com> - 2.5-1
237c9c
- Update to 2.5
237c9c
  Resolves: #2040081
237c9c
f7ca3d
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.6-2
f7ca3d
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
f7ca3d
  Related: rhbz#1991688
f7ca3d
f7ca3d
* Thu Jun 10 2021 Benjamin Berg <bberg@redhat.com> - 2.4.6-1
f7ca3d
- Update to 2.4.6 (#1965783)
f7ca3d
- Update main license to GPLv2 only for now
f7ca3d
- Add bundled(qcustomplot) for monitor subpackage
f7ca3d
- Resolves: #1961047
f7ca3d
f7ca3d
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.1-4
f7ca3d
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
f7ca3d
f7ca3d
* Tue Feb 02 2021 Benjamin Berg <bberg@redhat.com> - 2.4.1-3
f7ca3d
- Add upstream patch fixing parsing of passive targets
f7ca3d
f7ca3d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f7ca3d
f7ca3d
* Tue Dec 01 2020 Benjamin Berg <bberg@redhat.com> - 2.4.1-1
f7ca3d
- New upstream release (#1903094)
f7ca3d
f7ca3d
* Thu Nov 26 2020 Benjamin Berg <bberg@redhat.com> - 2.4-1
f7ca3d
- New upstream release (#1901810)
f7ca3d
  Resolves: #1894178
f7ca3d
  Resolves: #1892534
f7ca3d
f7ca3d
* Tue Sep 01 2020 Benjamin Berg <bberg@redhat.com> - 2.3-2
f7ca3d
- Fix Lenovo kill switch (#1874462)
f7ca3d
f7ca3d
* Tue Aug 25 2020 Benjamin Berg <bberg@redhat.com> - 2.3-1
f7ca3d
- New upstream release 2.3 (rhbz#1866784)
f7ca3d
- Add patch to fix printf on non-64 bit
f7ca3d
f7ca3d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f7ca3d
f7ca3d
* Mon Jun 08 2020 Benjamin Berg <bberg@redhat.com> - 2.2-1
f7ca3d
- New upstream release 2.2 (rhbz#1827883)
f7ca3d
f7ca3d
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f7ca3d
f7ca3d
* Wed Dec 18 2019 Benjamin Berg <bberg@redhat.com> - 1.9.1-1
f7ca3d
- New upstream release 1.9 (rhbz#1782249)
f7ca3d
- Drop Patch0, it has been merged upstream
f7ca3d
f7ca3d
* Fri Sep 20 2019 Christian Kellner <ckellner@redhat.com> - 1.9-1
f7ca3d
- New upstream release 1.9 (rhbz#1742290)
f7ca3d
- Update patch0 (taken from upstream, commit dcdaf52...)
f7ca3d
f7ca3d
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f7ca3d
f7ca3d
* Fri May 17 2019 Benjamin Berg <bberg@redhat.com> - 1.8-2
f7ca3d
- Fix build on i686
f7ca3d
f7ca3d
* Fri May 17 2019 Benjamin Berg <bberg@redhat.com> - 1.8-1
f7ca3d
- New upstream release (#1582506)
f7ca3d
f7ca3d
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-4
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f7ca3d
f7ca3d
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-3
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f7ca3d
f7ca3d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f7ca3d
f7ca3d
* Thu Dec 28 2017 Björn Esser <besser82@fedoraproject.org> - 1.7.1-1
f7ca3d
- New upstream release (#1505144)
f7ca3d
f7ca3d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f7ca3d
f7ca3d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-7
f7ca3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f7ca3d
f7ca3d
* Sat Jul 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-6
f7ca3d
- Add upstreamed patch to silence compiler warnings
f7ca3d
f7ca3d
* Sat Jul 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-5
f7ca3d
- Replace fix for rhbz#1464548 from upstream commit
f7ca3d
- Add upstream patch to fix README
f7ca3d
f7ca3d
* Fri Jun 30 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-4
f7ca3d
- Add upstream patch to fix ThermalMonitor (rhbz#1464548)
f7ca3d
- Add several fixes from upstream
f7ca3d
f7ca3d
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-3
f7ca3d
- Explicitly turn on hardening, if required
f7ca3d
f7ca3d
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-2
f7ca3d
- Fix missing trailing semicolon in desktop-file
f7ca3d
f7ca3d
* Tue Apr 11 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-1
f7ca3d
- Initial import (rhbz#1440406)
f7ca3d
f7ca3d
* Mon Apr 10 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.4
f7ca3d
- Use qmake_qt5-macro and build out of tree
f7ca3d
f7ca3d
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.3
f7ca3d
- Small packaging improvements
f7ca3d
f7ca3d
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.2
f7ca3d
- Add management-script
f7ca3d
f7ca3d
* Sat Apr 08 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-0.1
f7ca3d
- Initial rpm-release (rhbz#1440406)