Blob Blame History Raw
Name:       gnome-shell-extension-freon
Summary:    GNOME Shell extension to display system temperature, voltage, and fan speed
Version:    30
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}
	%{_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
* Mon Oct 30 2017 Andrew Toskin <andrew@tosk.in> - 30-1
- Bump to upstream version 30, which assures support in GNOME 3.26,
  fixes a bug related to Nvidia drivers, and adds Spanish translations.
- Move setup notes from RPM description to packaged README-fedora file.

* Tue Aug 15 2017 Andrew Toskin <andrew@tosk.in> - 27-1
- Bump to upstream version 27, which fixes Nvidia GPU label detection.

* Fri Aug 11 2017 Andrew Toskin <andrew@tosk.in> - 26-1
- Bump to upstream version 26, which adds support for using multiple Nvidia
  cards simultaneously.

* Sun Aug 06 2017 Andrew Toskin <andrew@tosk.in> - 25-1
- Bump to upstream version 25, which adds localization for German.

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Jun 10 2017 Andrew Toskin <andrew@tosk.in> - 24-1
- Bump to upstream version 24, which adds new localizations for Spanish and
  Polish.
  https://github.com/UshakovVasilii/gnome-shell-extension-freon/compare/EGO-23...EGO-24

* Wed Mar 29 2017 Andrew Toskin <andrew@tosk.in> - 23-4
- Remove the sensors-detect scriptlet.

* Mon Mar 27 2017 Andrew Toskin <andrew@tosk.in> - 23-3
- Explicitly compile gschemas on EPEL 7.
- Add extra warning to package description about using lm_sensors.

* Tue Mar 21 2017 Andrew Toskin <andrew@tosk.in> - 23-2
- Revised package description.
- Added EPEL 7 branch.

* Tue Mar 14 2017 Andrew Toskin <andrew@tosk.in> - 23-1
- First build accepted into Fedora repos.