%define _commit 39d343b7db95c69028ca5eec852b5a59fbd73e8d %define _shortcommit %(c=%{_commit}; echo ${c:0:7}) Summary: Automatic LUKS header updates via PAM Name: pam-cryptsetup Version: 0 Release: 0.1.20201223.%{_shortcommit}%{?dist} Source0: https://github.com/google/%{name}/archive/%{_commit}.tar.gz #Patch0: pam-cryptsetup-no-stringop-truncation.patch License: ASL 2.0 URL: https://github.com/google/%{name} BuildRequires: autoconf BuildRequires: automake BuildRequires: cryptsetup-devel BuildRequires: device-mapper-devel BuildRequires: gcc BuildRequires: gettext-devel BuildRequires: glib2-devel BuildRequires: libtool BuildRequires: make BuildRequires: pam-devel %description pam-cryptsetup provides a PAM module that allows LUKS-based disk encryption passwords to be kept in sync with account passwords automatically %prep %autosetup -n %{name}-%{_commit} %build export CFLAGS='-g -O2 -fPIC -Wno-error=stringop-truncation -Wno-stringop-truncation' ./autogen.sh %configure --with-pic %make_build prefix=%{_prefix} %install %make_install prefix=%{_prefix} %check if [ ${EUID} = 0 ]; then make check else printf 'Tests must be run as root\n' fi %files %defattr(-,root,root) %{_libdir}/security/pam_cryptsetup.la %{_libdir}/security/pam_cryptsetup.so %{_libexecdir}/pam-cryptsetup/pam_cryptsetup_helper %changelog * Wed Dec 23 2020 Joel Goguen - 0-0.1.20201223.39d343b - Update to latest master * Sat Feb 08 2020 Joel Goguen - 0-0.1.20200207.7b42892 - Initial spec file