aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2015-07-11 14:23:44 -0500
committerBrent Cook <busterb@gmail.com>2015-07-12 22:10:48 -0500
commitbda20bd13f8bf2063f915a3619db2292b38b6d88 (patch)
tree9f548beca79f42a905b1c236eaed077e9fabcfc2 /apps
parent83d07710b517cf5472bc57377ba3440db194805a (diff)
downloadportable-bda20bd13f8bf2063f915a3619db2292b38b6d88.tar.gz
portable-bda20bd13f8bf2063f915a3619db2292b38b6d88.tar.bz2
portable-bda20bd13f8bf2063f915a3619db2292b38b6d88.zip
Improve automatic handling of OPENSSLDIR
Install a default cert.pem, openssl.cnf, x509v3.cnf in OPENSSLDIR, which is derived by default from sysconfdir and the prefix setting.
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile.am22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/Makefile.am b/apps/Makefile.am
index 3604349..d756e10 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -84,4 +84,24 @@ noinst_HEADERS += s_apps.h
84noinst_HEADERS += testdsa.h 84noinst_HEADERS += testdsa.h
85noinst_HEADERS += testrsa.h 85noinst_HEADERS += testrsa.h
86noinst_HEADERS += timeouts.h 86noinst_HEADERS += timeouts.h
87noinst_HEADERS += openssl.cnf 87
88EXTRA_DIST = cert.pem
89EXTRA_DIST += openssl.cnf
90EXTRA_DIST += x509v3.cnf
91
92install-exec-hook:
93 @mkdir -p "$(DESTDIR)/$(OPENSSLDIR)"
94 @for i in cert.pem openssl.cnf x509v3.cnf; do \
95 if [ ! -f "$(DESTDIR)/$(OPENSSLDIR)/$i" ]; then \
96 $(INSTALL) -m 644 "$(srcdir)/$$i" "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \
97 else \
98 echo " $(DESTDIR)/$(OPENSSLDIR)/$$i already exists, install will not overwrite"; \
99 fi \
100 done
101
102uninstall-local:
103 @for i in cert.pem openssl.cnf x509v3.cnf; do \
104 if cmp -s "$(DESTDIR)/$(OPENSSLDIR)/$$i" "$(srcdir)/$$i"; then \
105 rm -f "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \
106 fi \
107 done