File gnome-shell-extension-lock-keys.spec of Package gnome-shell-extension-lock-keys
# https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_hosting_services
# From GitHub, commit f00ebbb
%global commit f00ebbb2811cb38b00d6985dfb8f91fbc3052f23
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%define gnome_shell_version %(gnome-shell --version | cut -d ' ' -f 3)
Name: gnome-shell-extension-lock-keys
Version: %{gnome_shell_version}
Release: 0
Summary: GNOME Shell Extension -- Lock Keys
License: GPL-2.0
Group: System/GUI/GNOME
Url: https://github.com/kazysmaster/gnome-shell-extension-lockkeys
Source: https://github.com/kazysmaster/gnome-shell-extension-lockkeys/archive/%{commit}/gnome-shell-extension-lockkeys-%{shortcommit}.tar.gz
BuildRequires: gnome-shell
BuildArch: noarch
Requires: gnome-shell
Recommends: %{name}-lang = %{version}
%description
It shows notifications about Num Lock or Caps Lock state change.
%lang_package
%prep
%autosetup -n gnome-shell-extension-lockkeys-%{commit}
%build
%install
mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions
cp -r lockkeys@vaina.lt %{buildroot}%{_datadir}/gnome-shell/extensions/
mv %{buildroot}%{_datadir}/gnome-shell/extensions/lockkeys@vaina.lt/locale %{buildroot}%{_datadir}/
mkdir -p %{buildroot}%{_datadir}/glib-2.0/schemas
mv %{buildroot}%{_datadir}/gnome-shell/extensions/lockkeys@vaina.lt/schemas/*.xml %{buildroot}%{_datadir}/glib-2.0/schemas/
rm -rf %{buildroot}%{_datadir}/gnome-shell/extensions/lockkeys@vaina.lt/schemas
%find_lang lockkeys
%files
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.lockkeys.gschema.xml
%{_datadir}/gnome-shell/extensions/lockkeys*
%files lang -f lockkeys.lang
%changelog