Skip to content

Commit 54c237e

Browse files
committed
openssl: add support for install_ssldirs and/or install_fips
1 parent ec5099e commit 54c237e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

recipes/openssl/3.x.x/conanfile.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class OpenSSLConan(ConanFile):
8383
"no_whirlpool": [True, False],
8484
"no_zlib": [True, False],
8585
"openssldir": [None, "ANY"],
86+
"with_ssldirs": [True, False],
8687
}
8788
default_options = {key: False for key in options.keys()}
8889
default_options["fPIC"] = True
@@ -397,7 +398,7 @@ def _configure_args(self):
397398
])
398399

399400
for option_name in self.default_options.keys():
400-
if self.options.get_safe(option_name, False) and option_name not in ("shared", "fPIC", "openssldir", "capieng_dialog", "enable_capieng", "zlib", "no_fips", "no_md2"):
401+
if self.options.get_safe(option_name, False) and option_name not in ("shared", "fPIC", "openssldir", "with_ssldirs", "capieng_dialog", "enable_capieng", "zlib", "no_fips", "no_md2"):
401402
self.output.info(f"Activated option: {option_name}")
402403
args.append(option_name.replace("_", "-"))
403404
return args
@@ -482,6 +483,7 @@ def _run_make(self, targets=None, parallel=True, install=False):
482483
command = [self._make_program]
483484
if install:
484485
command.append(f"DESTDIR={self.package_folder}")
486+
command.append(f"OPENSSLDIR=/etc/ssl")
485487
if targets:
486488
command.extend(targets)
487489
if not self._use_nmake:
@@ -513,7 +515,12 @@ def _make(self):
513515

514516
def _make_install(self):
515517
with chdir(self, self.source_folder):
516-
self._run_make(targets=["install_sw"], parallel=False, install=True)
518+
targets = ["install_sw"]
519+
if self.options.with_ssldirs:
520+
targets.append("install_ssldirs")
521+
if not self.options.no_fips:
522+
targets.append("install_fips")
523+
self._run_make(targets=targets, parallel=False, install=True)
517524

518525
def build(self):
519526
self._make()
@@ -672,4 +679,3 @@ def package_info(self):
672679

673680
# For legacy 1.x downstream consumers, remove once recipe is 2.0 only:
674681
self.env_info.OPENSSL_MODULES = openssl_modules_dir
675-

0 commit comments

Comments
 (0)