Blob Blame History Raw
Name:       gnome-shell-extension-freon
Summary:    GNOME Shell extension to display system temperature, voltage, and fan speed
Version:    34
Release:    1%{?dist}
URL:        https://extensions.gnome.org/extension/841/freon/
License:    GPLv2
BuildArch:  noarch

# You can see the latest source releases here:
# https://github.com/UshakovVasilii/gnome-shell-extension-freon/releases
Source0: https://github.com/UshakovVasilii/%{name}/archive/EGO-%{version}/%{name}-EGO-%{version}.tar.gz
Source1: README.md

# Dependencies described here:
# https://github.com/UshakovVasilii/gnome-shell-extension-freon/wiki/Dependency
Requires: gnome-shell >= 3.12
Requires: gnome-shell-extension-common
Requires: lm_sensors
Requires: udisks2

# CentOS 7 build environment doesn't support Recommends tag.
%if 0%{?fedora}
Recommends: gnome-tweak-tool
%endif


%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. For the GPU temperature, you may need to install the vendor's driver
for best results.



# 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}-EGO-%{version}

%build
# No compilation necessary.

%install
mkdir -p %{final_install_dir}
cp --recursive --preserve=mode,timestamps  %{UUID}/*  %{final_install_dir}
cp --recursive --preserve=mode,timestamps  %{SOURCE1}  ./README-fedora.md

# RPM will take care of gschemas, we don't need to include a precompiled copy.
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/
rm --recursive %{final_install_dir}/schemas/

# Remove source .po localization files, move binary .mo to system directory.
rm --recursive %{final_install_dir}/po/
mv  %{final_install_dir}/locale  %{buildroot}/%{_datadir}/
%find_lang freon


%posttrans
# The latest versions of Fedora compile gschemas automatically, but CentOS 7
# does not.
%if 0%{?rhel} && 0%{?rhel} <= 7
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas  &> /dev/null || :
%endif



%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
* Wed May 16 2018 Andrew Toskin <andrew@tosk.in> - 34-1
- Bump to upstream version 34, which improves the Polish and Spanish
  translations, and fixed a bug where it did not check for Nvidia
  lockfiles.

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 33-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Jan 22 2018 Andrew Toskin <andrew@tosk.in> - 33-1
- Bump to upstream version 33, which fixes typos in the Russian and
  Ukrainian locales, and fixes an instability issue that could cause GNOME
  Shell to crash.

* Sat Jan 06 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 31-2
- Scriptlets to compile glib schemas (probably) won't be necessary when
  RHEL 8 is eventually released.

* Tue Nov 14 2017 Andrew Toskin <andrew@tosk.in> - 31-1
- Bump to upstream version 31, which fixes the Russian translations, and adds a
  new locale for Ukrainian.