Blame gnome-shell-extension-caffeine.spec

Jeremy Newton 1f3de63
%global commit		2394e7f7180542beccaad28cb557045ff07ecd48
Jeremy Newton 1f3de63
%global shortcommit	%(c=%{commit}; echo ${c:0:7})
Jeremy Newton 1f3de63
%global gitdate	20220331
Jeremy Newton 1f3de63
%global fgittag	%{gitdate}.git%{shortcommit}
Mystro256 0029527
%global extdir		caffeine@patapon.info
Mystro256 0029527
%global gschemadir	%{_datadir}/glib-2.0/schemas
Mystro256 0029527
Mystro256 0029527
Name:		gnome-shell-extension-caffeine
54b40ab
Version:	39
Jeremy Newton 1f3de63
Release:	3%{?fgittag:.%{fgittag}}%{?dist}
Mystro256 f846929
Summary:	Disable the screen saver and auto suspend in gnome shell
Mystro256 0029527
Mystro256 0029527
License:	GPLv2
Mystro256 0029527
URL:		https://github.com/eonpatapon/gnome-shell-extension-caffeine
Jeremy Newton 1f3de63
%if 0%{?shortcommit:1}
Jeremy Newton 1f3de63
Source0:	https://github.com/eonpatapon/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Jeremy Newton 1f3de63
%else
Mystro256 bcaba1a
Source0:	https://github.com/eonpatapon/%{name}/archive/v%{version}.tar.gz#/%{name}-v%{version}.tar.gz
Jeremy Newton 1f3de63
%endif
Mystro256 0029527
Mystro256 0029527
BuildArch:	noarch
Mystro256 0029527
Mystro256 0029527
BuildRequires:	gettext
Mystro256 0029527
BuildRequires:	%{_bindir}/glib-compile-schemas
Mystro256 0029527
Mystro256 0029527
Requires:	gnome-shell-extension-common
Mystro256 0029527
Mystro256 0029527
%description
Mystro256 f846929
This extension allows the user to easily disable the screen saver and auto
Mystro256 f846929
suspend in gnome shell via an icon in the top bar. By default, this function
Mystro256 f846929
is also enabled if a full screen application is running, and can be configured
Mystro256 f846929
to disable gnome shell's night light as well.
Mystro256 0029527
Mystro256 0029527
%prep
Jeremy Newton 1f3de63
%autosetup %{?commit:-n %{name}-%{commit}}
Mystro256 0029527
Mystro256 0029527
%build
Mystro256 f846929
./update-locale.sh
Mystro256 0029527
glib-compile-schemas --strict --targetdir=%{extdir}/schemas/ %{extdir}/schemas
Mystro256 0029527
Mystro256 0029527
%install
Mystro256 f846929
mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions
Mystro256 0029527
cp -ar %{extdir} %{buildroot}%{_datadir}/gnome-shell/extensions/%{extdir}
Mystro256 0029527
%find_lang %{name} --all-name
Mystro256 0029527
Mystro256 0029527
# Fedora and EPEL 8 handles post scripts via triggers
Mystro256 0029527
%if 0%{?rhel} && 0%{?rhel} <= 7
Mystro256 0029527
%postun
Mystro256 0029527
if [ $1 -eq 0 ] ; then
Mystro256 0029527
	%{_bindir}/glib-compile-schemas %{gschemadir} &> /dev/null || :
Mystro256 0029527
fi
Mystro256 0029527
Mystro256 0029527
%posttrans
Mystro256 0029527
%{_bindir}/glib-compile-schemas %{gschemadir} &> /dev/null || :
Mystro256 0029527
%endif
Mystro256 0029527
Mystro256 0029527
%files -f %{name}.lang
Mystro256 0029527
%license COPYING
Mystro256 0029527
%{_datadir}/gnome-shell/extensions/%{extdir}
Mystro256 0029527
Mystro256 0029527
%changelog
Jeremy Newton 1f3de63
* Thu Mar 31 2022 Jeremy Newton <alexjnewt at hotmail dot com> - 39-3.20220331.git2394e7f
Jeremy Newton 1f3de63
- Update to git snapshot to fix f36
Jeremy Newton 1f3de63
887328e
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 39-2
887328e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
887328e
54b40ab
* Sat Oct 30 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 39-1
54b40ab
- Update to v39
54b40ab
60a6140
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 38-2
60a6140
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
60a6140
Mystro256 f268bf4
* Thu May 20 2021 Jeremy Newton <alexjnewt at hotmail dot com> - 38-1
Mystro256 f268bf4
- Update to v38
Mystro256 f268bf4
41375c0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 37-2
41375c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
41375c0
Mystro256 0029527
* Sun Jan 10 2021 Jeremy Newton <alexjnewt at hotmail dot com> - 37-1
Mystro256 0029527
- Initial package