3 %bcond_without curl # cURL support
4 %bcond_without ldap # LDAP support (via OpenLDAP)
5 %bcond_with nss # NSS instead of OpenSSL
6 %bcond_without pcsc # PC/SC Lite support
8 Summary: PAM login module that allows a X.509 certificate based user login
9 Summary(pl.UTF-8): Moduł PAM umożliwiający logowanie się w oparciu o certyfikat X.509
15 #Source0Download: https://github.com/OpenSC/pam_pkcs11/releases
16 Source0: https://github.com/OpenSC/pam_pkcs11/archive/pam_pkcs11-%{version}.tar.gz
17 # Source0-md5: e09e5e54ca92e0610e70eef9170e2355
18 URL: https://github.com/OpenSC/pam_pkcs11
19 BuildRequires: autoconf >= 2.69
20 BuildRequires: automake
21 %{?with_curl:BuildRequires: curl-devel}
22 BuildRequires: gettext-tools >= 0.17
23 BuildRequires: libxslt-progs
24 BuildRequires: libtool >= 2:2
25 %{?with_nss:BuildRequires: nss-devel}
26 %{?with_ldap:BuildRequires: openldap-devel >= 2.4.6}
27 %{!?with_nss:BuildRequires: openssl-devel}
28 BuildRequires: pam-devel
29 %{?with_pcsc:BuildRequires: pcsc-lite-devel >= 1.6.0}
30 BuildRequires: pkgconfig
31 %{?with_pcsc:Requires: pcsc-lite-libs >= 1.6.0}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _libdir /%{_lib}
37 This PAM login module allows a X.509 certificate based user login. The
38 certificate and its dedicated private key are thereby accessed by
39 means of an appropriate PKCS#11 module. For the verification of the
40 users' certificates, locally stored CA certificates as well as either
41 online or locally accessible CRLs are used.
43 %description -l pl.UTF-8
44 Ten moduł PAM umożliwia logowanie się w oparciu o certyfikaty X.509.
45 Certyfikat i jego klucz prywatny są odczytywane poprzez odpowiedni
46 moduł PKCS#11. Do weryfikacji certyfikatów użytkowników używane są
47 lokalnie przechowywane certyfikaty CA albo dostępne lokalnie lub
51 %setup -q -n pam_pkcs11-pam_pkcs11-%{version}
56 %{__aclocal} -I aclocal
61 --disable-silent-rules \
62 %{?with_curl:--with-curl} \
63 %{!?with_ldap:--without-ldap} \
64 %{?with_nss:--with-nss} \
65 %{!?with_pcsc:--without-pcsclite}
69 rm -rf $RPM_BUILD_ROOT
72 DESTDIR=$RPM_BUILD_ROOT
74 %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_pkcs11.la
75 %{__rm} $RPM_BUILD_ROOT%{_libdir}/pam_pkcs11/*.la
77 %{__rm} $RPM_BUILD_ROOT%{_docdir}/pam_pkcs11/*.example
82 rm -rf $RPM_BUILD_ROOT
84 %files -f pam_pkcs11.lang
85 %defattr(644,root,root,755)
86 %doc AUTHORS ChangeLog NEWS README TODO doc/{README.*,*.html,*.css} etc/*.example
87 %attr(755,root,root) %{_bindir}/card_eventmgr
88 %attr(755,root,root) %{_bindir}/pkcs11_eventmgr
89 %attr(755,root,root) %{_bindir}/pkcs11_inspect
90 %attr(755,root,root) %{_bindir}/pkcs11_listcerts
91 %attr(755,root,root) %{_bindir}/pkcs11_make_hash_link
92 %attr(755,root,root) %{_bindir}/pkcs11_setup
93 %attr(755,root,root) %{_bindir}/pklogin_finder
94 %attr(755,root,root) /%{_lib}/security/pam_pkcs11.so
95 %dir %{_libdir}/pam_pkcs11
96 %attr(755,root,root) %{_libdir}/pam_pkcs11/*.so
97 %{_mandir}/man1/card_eventmgr.1*
98 %{_mandir}/man1/pkcs11_*.1*
99 %{_mandir}/man1/pklogin_finder.1*
100 %{_mandir}/man8/pam_pkcs11.8*