void-packages/srcpkgs/xautolock/template
Peter Bui 23de10612c xautolock: add patch to fix silent failure on -restart command (#1325)
If you run 'xautolock' instead of '/usr/bin/xautolock', execv will fail
because it cannot found the path to the program when the -restart
command is requested.  Use execvp instead of execv, which will search
the environmental PATH to find the program, thus allowing you to just
run 'xautolock' rather than the full path.

This fixes the bug where playing a video with mpv accidently kills your
screenlocker since it calls xdg-screensaver reset, which in turn calls
xautolock -restart.
2018-08-01 19:25:33 +02:00

20 lines
636 B
Bash

# Template file for 'xautolock'
pkgname=xautolock
version=2.2
revision=6
hostmakedepends="imake xorg-cf-files"
makedepends="libXScrnSaver-devel xorgproto"
short_desc="Autolock utility for X"
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
license="GPL-2"
homepage="http://www.ibiblio.org/pub/Linux/X11/screensavers/"
distfiles="${homepage}/${pkgname}-${version}.tgz"
checksum=11f0275175634e6db756e96f5713ec91b8b1c41f8663df54e8a5d27dc71c4da2
do_build() {
CC=cc xmkmf
make CC=$CC CDEBUGFLAGS="-D_DEFAULT_SOURCE ${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}"
}
do_install() {
make MANSUFFIX=1 DESTDIR=${DESTDIR} install install.man
}