diff options
| author | Brent Cook <busterb@gmail.com> | 2015-07-11 14:23:44 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2015-07-12 22:10:48 -0500 |
| commit | bda20bd13f8bf2063f915a3619db2292b38b6d88 (patch) | |
| tree | 9f548beca79f42a905b1c236eaed077e9fabcfc2 /apps | |
| parent | 83d07710b517cf5472bc57377ba3440db194805a (diff) | |
| download | portable-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.am | 22 |
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 | |||
| 84 | noinst_HEADERS += testdsa.h | 84 | noinst_HEADERS += testdsa.h |
| 85 | noinst_HEADERS += testrsa.h | 85 | noinst_HEADERS += testrsa.h |
| 86 | noinst_HEADERS += timeouts.h | 86 | noinst_HEADERS += timeouts.h |
| 87 | noinst_HEADERS += openssl.cnf | 87 | |
| 88 | EXTRA_DIST = cert.pem | ||
| 89 | EXTRA_DIST += openssl.cnf | ||
| 90 | EXTRA_DIST += x509v3.cnf | ||
| 91 | |||
| 92 | install-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 | |||
| 102 | uninstall-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 | ||
