name=i3lock version=2.8 update_url="https://i3wm.org/$name/" define_option 'pam: Use PAM for authentication' dlextract "https://i3wm.org/$name/$name-$version.tar.bz2" \ '89de7b7d46fdb05638122cf3c2512093' option !pam extrafile "$name-$version-no-pam.patch" header_end cd "$name-$version" option !pam patch -p0 -i "../$name-$version-no-pam.patch" # Fix install directories sed -i -e "/\$(INSTALL)/s/bin/$(safe_sed "$dir_bindir")/" Makefile make install \ PREFIX="/$dir_prefix" \ SYSCONFDIR="/$dir_sysconfdir" \ DESTDIR="$dir_install" # Install the manpage install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man1/" "$name.1" # If not using PAM, we need suid to know the user's password, as well as make sure the locker isn't killed by the kernel. # Don't worry, the locker drops privileges back to your user as soon as possible. option !pam chmod 4711 "$dir_install/$dir_prefix/$dir_bindir/$name" # vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: