Update to 2.5.6, spec cleanups

This commit is contained in:
Peter Robinson 2024-02-11 17:50:19 +00:00
parent 780781fdbd
commit 150b421cd8
2 changed files with 19 additions and 34 deletions

View File

@ -1 +1 @@
SHA512 (thermald-2.5.tar.gz) = 0112d1648c6eed127c83eecb69ac5dcd56614dc485a9d54cd14d6506ad1c48c80880b1d3498258d65a0435220ef3ad3f7ddaa1f5a6f9595c9b56e14d71629390 SHA512 (thermald-2.5.6.tar.gz) = d039e4bd4ed203caf786c8090c27910b5b5f3886e8e4d160d6347bb2b8c1d6aaaca14958ee91ad4aedb02e67f8a6403805719bf07d55f03fe1f28f3e4378ae73

View File

@ -1,15 +1,9 @@
# Explicitly turn on hardening, if required.
%if 0%{?rhel} && 0%{?rhel} <= 7
%global _hardened_build 1
%endif
%global pkgname thermal_daemon %global pkgname thermal_daemon
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10] %bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
Name: thermald Name: thermald
Version: 2.5 Version: 2.5.6
Release: %autorelease Release: %autorelease
Summary: Thermal Management daemon Summary: Thermal Management daemon
@ -20,7 +14,7 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# No cpuid.h on other arches. # No cpuid.h on other arches.
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64
BuildRequires: make BuildRequires: make
BuildRequires: autoconf autoconf-archive BuildRequires: autoconf autoconf-archive
BuildRequires: automake BuildRequires: automake
BuildRequires: dbus-glib-devel BuildRequires: dbus-glib-devel
@ -71,14 +65,14 @@ embedded devices.
%autosetup -n %{pkgname}-%{version} -p 1 %autosetup -n %{pkgname}-%{version} -p 1
# Create tmpfiles.d config. # Create tmpfiles.d config.
%{__mkdir} -p fedora_addons mkdir -p fedora_addons
%{__cat} << EOF > fedora_addons/%{name}.conf cat << EOF > fedora_addons/%{name}.conf
d %{_rundir}/%{name} 0755 root root - d %{_rundir}/%{name} 0755 root root -
EOF EOF
%if %{with qt} %if %{with qt}
# Create desktop-file for the monitor-app. # Create desktop-file for the monitor-app.
%{__cat} << EOF > fedora_addons/%{name}-monitor.desktop cat << EOF > fedora_addons/%{name}-monitor.desktop
[Desktop Entry] [Desktop Entry]
Name=%{name} Monitor Name=%{name} Monitor
Comment=Application for monitoring %{name} Comment=Application for monitoring %{name}
@ -91,7 +85,7 @@ Terminal=false
EOF EOF
# Create icon for the monitor-app. # Create icon for the monitor-app.
%{__cat} << EOF > fedora_addons/%{name}-monitor.svg cat << EOF > fedora_addons/%{name}-monitor.svg
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
@ -144,7 +138,7 @@ EOF
EOF EOF
# Create ReadMe.txt for the monitor-app. # Create ReadMe.txt for the monitor-app.
%{__cat} << EOF > fedora_addons/%{name}-monitor.ReadMe.txt cat << EOF > fedora_addons/%{name}-monitor.ReadMe.txt
Running the thermald-monitor-app Running the thermald-monitor-app
-------------------------------- --------------------------------
@ -168,8 +162,8 @@ NO_CONFIGURE=1 ./autogen.sh
%if %{with qt} %if %{with qt}
# Build the monitor-app. # Build the monitor-app.
pushd tools/thermal_monitor pushd tools/thermal_monitor
sed -i -e 's/-lqcustomplot/-lqcustomplot-qt5/' ThermalMonitor.pro sed -i -e 's/QCustomPlot/qcustomplot-qt5/' ThermalMonitor.pro
%{__mkdir} -p %{_target_platform} mkdir -p %{_target_platform}
pushd %{_target_platform} pushd %{_target_platform}
%{qmake_qt5} .. %{qmake_qt5} ..
%make_build %make_build
@ -182,38 +176,29 @@ popd
%make_install %make_install
# Install management-script. # Install management-script.
%{__install} -Dpm 0755 tools/thermald_set_pref.sh \ install -Dpm 0755 tools/thermald_set_pref.sh \
%{buildroot}%{_bindir}/%{name}-set-pref %{buildroot}%{_bindir}/%{name}-set-pref
# DBus config belongs into %%{_datadir}.
%{__mkdir} -p %{buildroot}%{_datadir}
%{__mv} -f %{buildroot}%{_sysconfdir}/dbus-1/* %{buildroot}%{_datadir}/dbus-1/
# No Upstart.
%{__rm} -fr %{buildroot}%{_sysconfdir}/init
# Setup tmpfiles.d # Setup tmpfiles.d
%{__install} -Dpm 0644 fedora_addons/%{name}.conf \ install -Dpm 0644 fedora_addons/%{name}.conf %{buildroot}%{_tmpfilesdir}/%{name}.conf
%{buildroot}%{_tmpfilesdir}/%{name}.conf install -dm 0755 %{buildroot}%{_rundir}/%{name}
%{__install} -dm 0755 %{buildroot}%{_rundir}/%{name}
/bin/echo "%{name}_pid" > %{buildroot}%{_rundir}/%{name}/%{name}.pid /bin/echo "%{name}_pid" > %{buildroot}%{_rundir}/%{name}/%{name}.pid
%{__chmod} -c 0644 %{buildroot}%{_rundir}/%{name}/%{name}.pid chmod -c 0644 %{buildroot}%{_rundir}/%{name}/%{name}.pid
%if %{with qt} %if %{with qt}
# Install the monitor-app. # Install the monitor-app.
%{__install} -Dpm 0755 tools/thermal_monitor/%{_target_platform}/ThermalMonitor \ install -Dpm 0755 tools/thermal_monitor/%{_target_platform}/ThermalMonitor \
%{buildroot}%{_bindir}/ThermalMonitor %{buildroot}%{_bindir}/ThermalMonitor
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.desktop \ install -Dpm 0644 fedora_addons/%{name}-monitor.desktop \
%{buildroot}%{_datadir}/applications/%{name}-monitor.desktop %{buildroot}%{_datadir}/applications/%{name}-monitor.desktop
%{__install} -Dpm 0644 fedora_addons/%{name}-monitor.svg \ install -Dpm 0644 fedora_addons/%{name}-monitor.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}-monitor.svg
%endif %endif
%check %check
%if %{with qt} %if %{with qt}
%{_bindir}/desktop-file-validate \ %{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{buildroot}%{_datadir}/applications/*.desktop
%endif %endif
@ -234,11 +219,11 @@ exit 0
%systemd_postun_with_restart thermald.service %systemd_postun_with_restart thermald.service
%files %files
%license COPYING
%config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}
%doc README.txt thermal_daemon_usage.txt %doc README.txt thermal_daemon_usage.txt
%ghost %dir %{_rundir}/%{name} %ghost %dir %{_rundir}/%{name}
%ghost %{_rundir}/%{name}/%{name}.pid %ghost %{_rundir}/%{name}/%{name}.pid
%license COPYING
%{_bindir}/%{name}-set-pref %{_bindir}/%{name}-set-pref
%{_datadir}/dbus-1/system-services/org.freedesktop.%{name}.service %{_datadir}/dbus-1/system-services/org.freedesktop.%{name}.service
%{_datadir}/dbus-1/system.d/org.freedesktop.%{name}.conf %{_datadir}/dbus-1/system.d/org.freedesktop.%{name}.conf