%global extdir %{_datadir}/gnome-shell/extensions/lockkeys@vaina.lt %global gschemadir %{_datadir}/glib-2.0/schemas %global giturl https://github.com/kazysmaster/gnome-shell-extension-lockkeys %global commit 856615ba330233420866655fbdba742ff90fd61e %global commit_short %%(c=%%{commit}; echo ${c:0:7}) %global commit_date 20230405 Name: gnome-shell-extension-lockkeys %if 0%{?commit:1} Version: 20230405g856615b %else Version: 20230405 %endif Release: 1%{?dist} Summary: Numlock and Capslock indicator for gnome-shell License: GPLv2+ URL: https://github.com/kazysmaster/gnome-shell-extension-lockkeys %if 0%{?commit:1} Source0: %{giturl}/archive/%{commit}.tar.gz %else Source0: %{giturl}/arcive/v%{version}.tar.gz %endif BuildArch: noarch Requires: gnome-shell-extension-common %if 0%{?fedora} Requires: libdbusmenu-gtk3 %endif %description Numlock and Capslock indicator for gnome-shell %prep %if 0%{?commit:1} %autosetup -n gnome-shell-extension-lockkeys-%{commit} -p 1 %else %autosetup -n gnome-shell-extension-lockkeys-v%{version} -p 1 %endif %build %install mkdir -p %{buildroot}%{extdir} %{buildroot}%{gschemadir} %{buildroot}%{_datadir}/locale %{buildroot}%{_sysconfdir}/dconf/db/local.d cp -fr ./lockkeys@vaina.lt/* %{buildroot}%{extdir} install -m 644 %{buildroot}%{extdir}/schemas/*gschema.xml %{buildroot}%{gschemadir} cat < /dev/null || : %{_bindir}/dconf update &> /dev/null || : fi %posttrans %{_bindir}/glib-compile-schemas %{gschemadir} &> /dev/null || : %{_bindir}/dconf update &> /dev/null || : %else %postun if [ $1 -eq 0 ] ; then %{_bindir}/dconf update &> /dev/null || : fi %posttrans %{_bindir}/dconf update &> /dev/null || : %endif %files %license lockkeys@vaina.lt/LICENSE %doc README.md %{_sysconfdir}/dconf %{extdir} %{gschemadir}/*gschema.xml %{_datadir}/locale %changelog * Wed Apr 19 2023 Astrawan Wayan - 20230405g856615b-1 - Bump version 20230405g856615b * Sun Nov 13 2022 Astrawan Wayan - 20221002gc6e8e1e-1 - Initial import