Name: pyxtrlock Version: 0.2 Release: 5%{?dist} Summary: The X transparent screen lock rewritten in Python License: GPLv3+ URL: https://zombofant.net/hacking/pyxtrlock Source0: https://github.com/leonnnn/pyxtrlock/archive/%{version}.tar.gz Source1: %{name}.png BuildArch: noarch BuildRequires: python3-devel BuildRequires: desktop-file-utils # Note: explicit lib dependencies because these are used through python ctypes, # hence not picked up automatically by rpm. Requires: libX11 Requires: libxcb >= 1.4 Requires: xcb-util-image Requires: python3-simplepam %description pyxtrlock, like its predecessor xtrlock, is a very minimal X display lock program. While pyxtrlock is running, it does not obscure the screen, only the mouse and keyboard are grabbed and the mouse cursor becomes a padlock. Output displayed by X programs, and windows put up by new X clients, continue to be visible, and any new output is displayed normally. %prep %setup -q %build %{__python3} setup.py build %install %{__python3} setup.py install -O1 --skip-build --root %{buildroot} rm %{buildroot}%{python3_sitelib}/*.egg-info mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/pixmaps cat >> %{buildroot}/%{name}.desktop << EOF [Desktop Entry] Name=pyxtrlock Comment=Screen Lock Encoding=UTF-8 Icon=%{name} Exec=%{name} Terminal=false Type=Application EOF desktop-file-install \ --delete-original \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}/%{name}.desktop cp -a %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/ %files %doc README.md CHANGELOG COPYING %{_bindir}/%{name} %{python3_sitelib}/%{name}/ %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %changelog * Thu Feb 20 2014 Leon Weber - 0.2.5 - Use cp -a for install to preserve timestamp * Thu Feb 20 2014 Leon Weber - 0.2-4 - Add note justifying explicit lib dependencies - Use buildroot macro consistently - Ship pyxtrlock icon - Use mkdir -p without macro - Remove egg file * Wed Feb 19 2014 Leon Weber - 0.2-3 - Add .desktop file * Fri Feb 14 2014 Leon Weber - 0.2-2 - Explicitly state library dependencies * Tue Feb 11 2014 Leon Weber - 0.2-1 - First version for Fedora