## START: Set by rpmautospec
## (rpmautospec version 0.8.1)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global forgeurl https://github.com/UshakovVasilii/gnome-shell-extension-freon
Name: gnome-shell-extension-freon
Epoch: 2
Version: 58
%global srcversion EGO-%{version}
Release: %autorelease
Summary: GNOME Shell extension to display system temperature, voltage, and fan speed
License: GPL-2.0-only
URL: %{forgeurl}/wiki
Source: %{forgeurl}/archive/%{srcversion}/%{name}-%{srcversion}.tar.gz
BuildRequires: glib2
# Dependencies described here:
# https://github.com/UshakovVasilii/gnome-shell-extension-freon/wiki/Dependency
%if 0%{?fedora} >= 42
BuildRequires: gnome-shell-rpm-generators
%else
Requires: gnome-shell >= 45
%endif
Requires: gnome-shell-extension-common
Requires: lm_sensors
Recommends: nvme-cli
BuildArch: noarch
%description
Freon is a GNOME Shell extension for displaying the temperature of your
CPU, hard disk, solid state, and video card (NVIDIA, Catalyst, and
Bumblebee supported), as well as power supply voltage, and fan
speed. You can choose which HDD/SSD or other devices to include, what
temperature units to use, and how often to refresh the sensors readout,
and they will appear in the GNOME Shell top bar.
# UUID is defined in extension's metadata.json and used as directory name.
%global UUID freon@UshakovVasilii_Github.yahoo.com
%global gnome_extensions_dir %{_datadir}/gnome-shell/extensions/
%global final_install_dir %{buildroot}/%{gnome_extensions_dir}/%{UUID}
%prep
%autosetup -n %{name}-%{srcversion}
cat > ./README-fedora.md << EOF
**NOTE** that if you want to see GPU temperature, you will need to
install the vendor's official driver and any related packages. (Nouveau
unfortunately won't work for Nvidia cards.)
- hard drive temperatures requires that you probe the `drivetemp.ko`
kernel module. One way is to add the file
/etc/modules-load.d/drivetemp.conf with a single line saying
drivetemp
- Nvidia GPU temperatures require the `nvidia-settings` application,
typically installed with the proprietary Nvidia drivers
- AMD GPU temperatures requires `aticonfig`, part of AMD Radeon Software
(formerly known as AMD Catalyst)
- Bumblebee + Nvidia requires `optirun`
You can read more about this and other tips
**on the Freon [wiki](https://github.com/UshakovVasilii/gnome-shell-extension-freon/wiki)**.
Also, after installing this GNOME Shell extension, each user that wants
it must still manually enable Freon before it will take effect. You can
do so a few different ways.
First, restart GNOME Shell (Open the command dialog with Alt-F2, type
\`r\`, and hit enter), or log out and log back in. Then:
- If you've already set up the GNOME Shell web browser plugin, go to
, find the extension, and click
the switch to "ON."
- Open GNOME Tweaks, go to the Extensions tab, find the extension,
and click the switch to "ON."
- Open a terminal or the desktop's command dialog, and (as your normal
user account) run:
\`gnome-extensions enable %{UUID}\`
EOF
%build
# No compilation necessary.
%install
mkdir -p %{final_install_dir}
cp --recursive --preserve=mode,timestamps %{UUID}/* %{final_install_dir}
# RPM will take care of gschemas, but they should be installed to system-wide directory.
mkdir -p %{buildroot}/%{_datadir}/glib-2.0/schemas/
mv %{final_install_dir}/schemas/org.gnome.shell.extensions.sensors.gschema.xml \
%{buildroot}/%{_datadir}/glib-2.0/schemas/
rmdir %{final_install_dir}/schemas/
# Remove source .po localization files, move binary .mo to system directory.
mv %{final_install_dir}/locale %{buildroot}/%{_datadir}/
%find_lang freon
%files -f freon.lang
%doc README.md README-fedora.md
%license LICENSE
%{gnome_extensions_dir}/%{UUID}/
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.sensors.gschema.xml
%changelog
## START: Generated by rpmautospec
* Mon Apr 28 2025 Packit - 2:58-1
- Update to 58 upstream release
- Resolves: rhbz#2323335
* Mon Apr 28 2025 Michel Lind - 2:56-6
- Use gnome-shell-rpm-generators on Fedora >= 42
- Enable Packit
* Thu Jan 16 2025 Fedora Release Engineering - 2:56-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering - 2:56-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 15 2024 Davide Cavalca - 2:56-1
- Update spec to comply with the latest packaging guidelines
- Drop recommends for unrelated tools
- Trim description
* Tue Jun 11 2024 Trung LĂȘ <8@tle.id.au> - 2:56-0
- bump to version 56 supporting the GNOME 46
* Wed Jan 24 2024 Fedora Release Engineering - 2:55-3.20231215git8fee2fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering - 2:55-2.20231215git8fee2fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Dec 22 2023 Michel Lind - 2:55-1.20231215git8fee2fb
- bump to version 55 with PR 274 to fix pkexec issues
* Fri Nov 10 2023 Michal Ambroz - 2:54-1
- bump to version 54 supporting the gnome 45
- Use SPDX license identifier
* Wed Jul 19 2023 Fedora Release Engineering - 2:49-2.20230413git0d39ef0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering - 2:45-4.20221109gitf2c0c94
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Dec 17 2022 Linus Walleij - 2:45-3
- Obtain a new git snapshot so that Fedora 37 can work.
- Point out in docs that we want to use the drivetemp.ko kernel module.
* Thu Jul 21 2022 Fedora Release Engineering - 2:45-2.20220710gitdab42ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jul 10 2022 Linus Walleij - 2:45-1
- Update to 45 (#2009382)
- Turkish translation file problem is fixed upstream.
- Trash po directory removed upstream
* Thu Jan 20 2022 Fedora Release Engineering - 2:44-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering - 2:44-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun Apr 18 2021 Audrey Toskin - 2:44-1
- Bump to Freon 44, which merges the upstream pull request used in
43-4.20210401.8e24564.
* Mon Apr 5 2021 Audrey Toskin - 2:43-4.20210401.8e24564
- Update based on unmerged upstream pull request, which fixes GNOME 40
compatibility.
* Thu Mar 11 2021 Audrey Toskin - 2:43-3
- Minor rebuild to mark Freon 43 as incompatible with GNOME 40.
* Tue Jan 26 2021 Fedora Release Engineering - 2:43-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Oct 16 2020 Audrey Toskin - 2:43-1
- Bump to upstream version 43, which fixes support for GNOME 3.38.
* Tue Oct 06 2020 Audrey Toskin - 2:42-1
- Bump to upstream version 42, which updates some translations, icons,
and how average temperatures are calculated.
## END: Generated by rpmautospec