summaryrefslogtreecommitdiffstats
path: root/contrib/redhat
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-09-18 15:33:07 +1000
committerDamien Miller <djm@mindrot.org>2001-09-18 15:33:07 +1000
commitf2bd06c21e053176b80632967d7a842616780387 (patch)
tree1d3b8603e418ef985a683ef613645892a7432b82 /contrib/redhat
parent2c1e1cb135decd723288b4f3c512adf42dd06694 (diff)
- (djm) Make smartcard support conditional in Redhat RPM spec
Diffstat (limited to 'contrib/redhat')
-rw-r--r--contrib/redhat/openssh.spec18
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index ca1c20d1..2cda144a 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -13,6 +13,9 @@
# Do we want to link against a static libcrypto? (1=yes 0=no)
%define static_libcrypto 0
+# Do we want smartcard support (1=yes 0=no)
+%define scard 0
+
# Use Redhat 7.0 pam control file
%define redhat7 0
@@ -29,6 +32,10 @@
# rpm -ba|--rebuild --define "static_openssl 1"
%{?static_openssl:%define static_libcrypto 1}
+# Options for Smartcard support: (needs libsectok and openssl-engine)
+# rpm -ba|--rebuild --define "smartcard 1"
+%{?smartcard:%define scard 1}
+
%define exact_openssl_version %(rpm -q openssl | cut -d - -f 2)
Summary: The OpenSSH implementation of SSH.
@@ -137,6 +144,12 @@ GNOME GUI desktop environment.
%define _sysconfdir /etc/ssh
+EXTRA_OPTS=""
+
+%if %{smartcard}
+ EXTRA_OPTS="$EXTRA_OPTS --with-smartcard"
+%endif
+
%configure \
--libexecdir=%{_libexecdir}/openssh \
--datadir=%{_datadir}/openssh \
@@ -144,7 +157,8 @@ GNOME GUI desktop environment.
--with-tcp-wrappers \
--with-ipv4-default \
--with-rsh=/usr/bin/rsh \
- --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
+ --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin \
+ $EXTRA_OPTS
%if %{static_libcrypto}
perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
@@ -223,8 +237,10 @@ fi
%attr(0755,root,root) %dir %{_sysconfdir}
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/moduli
%attr(0755,root,root) %dir %{_libexecdir}/openssh
+%if %{smartcard}
%attr(0755,root,root) %dir %{_datadir}/openssh
%attr(0644,root,root) %{_datadir}/openssh/Ssh.bin
+%endif
%files clients
%defattr(-,root,root)