# Copyright © 2016 Martin Ueding # Licensed under the MIT license as the packaged software itself. # Rationale for choosing a post release: # # The version that I use from git is a couple commits *after* 0.3.0 and there # is no more recent tag in the upstream repository. Previously I have used # xss-lock 0.3.0 on Ubuntu 15.04 and had a bug with it, it would not exit when # I logged out of the graphics session. Then it would hammer one CPU core. The # repository contains commits which suggest that this bug has been addressed # but not yet released. %global checkout 20180309git %global commit0 e40e84f0907e8762d558ff762c48a10653d65656 %global shortcommit0 %(c=%{commit0}; echo ${c:0:12}) Name: xss-lock Version: 0.3.0 Release: 14.%{checkout}%{shortcommit0}%{?dist} Summary: Use external locker as X screen saver License: MIT Url: https://bitbucket.org/dexpl/xss-lock Source0: https://bitbucket.org/dexpl/%{name}/get/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz BuildRequires: xcb-util-devel libxcb-devel glib2-devel BuildRequires: cmake BuildRequires: gcc %if 0%{?fedora} >= 29 BuildRequires: python3-docutils %else BuildRequires: docutils %endif # To have the place to install bash/zsh completions BuildRequires: bash-completion zsh Requires: xcb-util # Description is a verbatim copy of the manual formatted to Markdown. %description *xss-lock* hooks up your favorite locker to the MIT screen saver extension for X and also to systemd's login manager. The locker is executed in response to events from these two sources: - X signals when screen saver activation is forced or after a period of user inactivity (as set with `xset s TIMEOUT`). In the latter case, the notifier command, if specified, is executed first. - The login manager can also request that the session be locked; as a result of `loginctl lock-sessions`, for example. Additionally, **xss-lock** uses the inhibition logic to lock the screen before the system goes to sleep. *xss-lock* waits for the locker to exit -- or kills it when screen saver deactivation or session unlocking is forced -- so the command should not fork. Also, *xss-lock* manages the idle hint on the login session. The idle state of the session is directly linked to user activity as reported by X (except when the notifier runs before locking the screen). When all sessions are idle, the login manager can take action (such as suspending the system) after a preconfigured delay. %package bash-completion Requires: bash-completion Requires: xss-lock = %{version}-%{release} Summary: bash-completion for xss-lock BuildArch: noarch %description bash-completion %{summary} %package zsh-completion Requires: zsh Requires: xss-lock = %{version}-%{release} Summary: zsh-completion for xss-lock BuildArch: noarch %description zsh-completion %{summary} %prep %setup -qn dexpl-%{name}-%{shortcommit0} %build %{?rhel:%__sed -i '/share\/doc\//s,\${PROJECT_NAME},&-${PROJECT_VERSION},' CMakeLists.txt doc/CMakeLists.txt} %cmake . %make_build %install %make_install %files %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %doc NEWS %doc doc/dim-screen.sh %doc doc/transfer-sleep-lock-generic-delay.sh %doc doc/transfer-sleep-lock-i3lock.sh %doc doc/xdg-screensaver.patch %license LICENSE %files bash-completion %{_datadir}/bash-completion/completions/xss-lock %files zsh-completion %{_datadir}/zsh/site-functions/_xss-lock %changelog * Sat Nov 03 2018 Vadim Raskhozhev - 0.3.0-14.20180309gite40e84f0907e - Properly fixed docutils build req. * Sat Nov 03 2018 Vadim Raskhozhev - 0.3.0-13.20180309gite40e84f0907e - Fixed python2-docutils build req. * Sat Nov 03 2018 Vadim Raskhozhev - 0.3.0-12.20180309gite40e84f0907e - Added gcc build req. * Sat Sep 08 2018 Vadim Raskhozhev - 0.3.0-10.1.20180309gite40e84f0907e - Removed useless 'Obsoletes:' * Fri Sep 07 2018 Vadim Raskhozhev - 0.3.0-10.20180309gite40e84f0907e - Moved bash- and zsh-completions into separate packages * Fri Sep 07 2018 Vadim Raskhozhev - 0.3.0-9.20180309gite40e84f0907e - Fixed build on CentOS - Added shortcommit0 to Release * Fri Mar 09 2018 Vadim Raskhozhev - 0.3.0-7.20140302git - Fixed https://bitbucket.org/raymonad/xss-lock/issues/5/ignore-x-screensaver - Changed upstream url * Thu Aug 03 2017 Fedora Release Engineering - 0.3.0-7.20140302git - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.3.0-6.20140302git - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.3.0-5.20140302git - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Jan 06 2016 Martin Ueding 0.3.0-4.20140302git - Own `zsh` directory * Tue Jan 05 2016 Martin Ueding 0.3.0-3.20140302git - Include full commit has - Let RPM find library dependencies automatically * Mon Jan 04 2016 Martin Ueding 0.3.0-2.20140302git - Use downloading and renaming support from `%%setup -qn` and `spectool -g` - Replace `%%define` with `%%global` - Own shell completion directory as this package does not explicitly depend on the shells - Add a wildcard to catch all manual page compression formats - Add a `Url` tag * Sat Jan 02 2016 Martin Ueding 0.3.0-1 - Initial RPM