%global gnome_extensions_dir %{_datadir}/gnome-shell/extensions/
%global UUID windowoverlay-icons@sustmidown.centrum.cz
%global install_destination %{buildroot}/%{gnome_extensions_dir}/%{UUID}
Name: gnome-shell-extension-windowoverlay-icons
Summary: Show app icons on top of the windows thumbnails in Activities Overview
Version: 31
Release: 2%{?dist}
URL: https://github.com/sustmi/gnome-shell-extension-windowoverlay-icons
License: GPLv3+
BuildArch: noarch
# You can see the latest releases here:
# https://github.com/sustmi/gnome-shell-extension-windowoverlay-icons/releases
Source0: https://github.com/sustmi/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: ./README.md
BuildRequires: gettext
# CentOS 7 doesn't automatically do gschema compilation yet.
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: glib2
%endif
Requires: gnome-shell >= 3.8
Requires: gnome-shell-extension-common
# (CentOS 7 build environment doesn't support Recommends tag.)
%if 0%{?fedora}
Recommends: gnome-tweak-tool
%endif
Obsoletes: gnome-shell-extension-sustmi-windowoverlay-icons <= 3.0-18
%description
Sometimes when you have many open windows, especially if they all
contain a lot of text, the windows all start to look the same in the
Activities Overview. WindowOverlay Icons adds the application icon to
every window thumbnail, making it easier to tell them apart.
%prep
%autosetup
%build
# Nothing to build.
%install
mkdir -p %{install_destination}
mkdir -p %{buildroot}/%{_datadir}/glib-2.0/schemas/
cp --recursive --preserve=mode,timestamps ./* %{install_destination}/
cp --recursive --preserve=mode,timestamps %{SOURCE1} ./README-fedora.md
# Remove duplicates of README and license.
rm %{install_destination}/README.md %{install_destination}/COPYING
# Make file is only used by upstream's packaging for GNOME Shell Extensions website.
rm %{install_destination}/Makefile
# Move gschemas to the system directory.
mv %{install_destination}/schemas/org.gnome.shell.extensions.windowoverlay-icons.gschema.xml \
%{buildroot}/%{_datadir}/glib-2.0/schemas/
rm --recursive %{install_destination}/schemas/
# Localizations.
for file in $( ls ./po/*.po ); do
locale=$( basename $file .po )
mkdir -p %{buildroot}/%{_datadir}/locale/$locale/LC_MESSAGES
msgfmt $file --output-file %{buildroot}/%{_datadir}/locale/$locale/LC_MESSAGES/windowoverlay-icons.mo
done
rm --recursive %{install_destination}/po/ %{install_destination}/locale/
%find_lang windowoverlay-icons
%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 windowoverlay-icons.lang
%license COPYING
%doc README.md README-fedora.md
%{gnome_extensions_dir}/%{UUID}/
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.windowoverlay-icons.gschema.xml
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Mar 11 2018 Andrew Toskin <andrew@tosk.in> - 31-1
- Bump to upstream version 31.
- Upstream made several releases in a short amount of time, which
collectively provide improvements to the default visual styles,
optimizations for icon animation, and general cleanup of the code
base, including a fix for an error that could happen if the user locks
the Shell in overview mode.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 27-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Oct 30 2017 Andrew Toskin <andrew@tosk.in> - 27-2
- Source tarball name should match package name.
- Move notes on setup to a README in docs directory.
* Wed Oct 25 2017 Andrew Toskin <andrew@tosk.in> - 27-1
- Split WindowOverlay Icons into its own package.