File caffeine.spec of Package caffeine
%define ename cups-of-caffeine
%define uname cups_of_caffeine
Name: caffeine
Version: 2.9.10
Release: %mkrel 1
Summary: Utility to inhibit screensaver and sleep modes
License: GPLv3+ and LGPLv3+
Group: Graphics/Utilities
Url: https://launchpad.net/caffeine
Source0: https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/caffeine/%{version}-1/%{name}_%{version}.orig.tar.gz
Patch0: caffeine-2.4.1.498-mga-desktop-files.patch
Patch1: caffeine-fix-flat-layout.spec
# For typelib() Requires
BuildRequires: pyproject-rpm-macros
BuildRequires: gobject-introspection
BuildRequires: pkgconfig(python3)
Requires: python3-xlib
Requires: python3-pkg-resources
Requires: python3-pyxdg
Requires: python3-dbus
Requires: python3-gobject
BuildArch: noarch
%description
Caffeine is a status bar application able to temporarily prevent the
activation of both the screensaver and the "sleep" powersaving mode.
%prep
%setup -q -n %{ename}-%{version}
%autopatch -p1
%build
%pyproject_wheel
%install
%pyproject_install
# we don't need ubuntu themes
rm -r %{buildroot}%{_datadir}/icons/ubuntu*
rm -rf %{buildroot}/usr/{VERSION,__pycache__/,compile_translations.py}
mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart
mv %{buildroot}%{python3_sitelib}/etc/xdg/autostart/caffeine.desktop %{buildroot}%{_sysconfdir}/xdg/autostart/caffeine.desktop
%find_lang %{name}-indicator
%files -f %{name}-indicator.lang
%doc README.md
%{_bindir}/*
%{python3_sitelib}/%{uname}-%{version}.dist-info
%{_datadir}/applications/%{name}*.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/icons/hicolor/*/status/%{name}-*.*
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/*.1*
%{_datadir}/caffeine-indicator/glade/GUI.glade
%{_sysconfdir}/xdg/autostart/caffeine.desktop
%changelog
* Fri Nov 04 2022 papoteur <papoteur> 2.9.10-1.mga9
+ Revision: 1903250
- new 2.9.10
port to pyproject
* Mon Mar 21 2022 umeabot <umeabot> 2.9.8-3.mga9
+ Revision: 1816159
- Mageia 9 Mass Rebuild
* Sun Feb 13 2022 mrambo3501 <mrambo3501> 2.9.8-2.mga9
+ Revision: 1774192
- rebuild for python-3.10
* Tue Mar 30 2021 daviddavid <daviddavid> 2.9.8-1.mga9
+ Revision: 1711890
- new version: 2.9.8 (update to AyatanaAppIndicator3) (mga#28678)
* Sun Mar 28 2021 daviddavid <daviddavid> 2.9.4-7.mga9
+ Revision: 1711444
- rebuild for python 3.9
* Sun Feb 16 2020 umeabot <umeabot> 2.9.4-6.mga8
+ Revision: 1533268
- Mageia 8 Mass Rebuild
* Fri Sep 20 2019 daviddavid <daviddavid> 2.9.4-5.mga8
+ Revision: 1444033
- port to Python 3
* Thu Sep 20 2018 umeabot <umeabot> 2.9.4-4.mga7
+ Revision: 1277789
- Mageia 7 Mass Rebuild
* Thu Apr 26 2018 kekepower <kekepower> 2.9.4-3.mga7
+ Revision: 1222691
- Remove do-not-have-pantheon.patch
* Wed Apr 25 2018 kekepower <kekepower> 2.9.4-2.mga7
+ Revision: 1222475
- Add patch to remove Pantheon from desktop file
- Update to version 2.9.4
- Rediffed patch
- Updated file list
* Sat Feb 20 2016 umeabot <umeabot> 2.4.1.498-10.mga6
+ Revision: 971667
- Mageia 6 Mass Rebuild
* Fri Oct 16 2015 daviddavid <daviddavid> 2.4.1.498-9.mga6
+ Revision: 892243
- use new python2 macros (fix build failure)
* Fri Jun 26 2015 alexl <alexl> 2.4.1.498-8.mga6
+ Revision: 845430
- add missing requires
* Tue Jan 06 2015 alexl <alexl> 2.4.1.498-7.mga5
+ Revision: 808754
- updated desktop files
* Wed Oct 15 2014 umeabot <umeabot> 2.4.1.498-6.mga5
+ Revision: 746199
- Second Mageia 5 Mass Rebuild
* Sat Sep 27 2014 tv <tv> 2.4.1.498-5.mga5
+ Revision: 725992
- rebuild for missing pythoneggs deps
* Tue Sep 16 2014 umeabot <umeabot> 2.4.1.498-4.mga5
+ Revision: 678281
- Mageia 5 Mass Rebuild
+ tv <tv>
- use %%global for req/prov exclude
- autoconvert to new prov/req excludes
* Thu Jul 31 2014 alexl <alexl> 2.4.1.498-3.mga5
+ Revision: 658756
- translated desktop file (i18n-desktop.patch)
* Sat May 31 2014 pterjan <pterjan> 2.4.1.498-2.mga5
+ Revision: 628123
- Rebuild for new Python
* Thu Apr 10 2014 alexl <alexl> 2.4.1.498-1.mga5
+ Revision: 613345
- fix desktop categories
- imported package caffeine