54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
version = "3.4.1"
|
|
revision = 1
|
|
description = "Cryptography and TLS library (OpenSSL)"
|
|
license = "Apache-2.0"
|
|
url = "https://www.openssl.org/"
|
|
source = tarball(
|
|
url=f"https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gz",
|
|
sha256="?",
|
|
)
|
|
host_deps = ["binutils", "gcc"]
|
|
deps = ["zlib"]
|
|
|
|
ossl_targets = {
|
|
"x86_64": "linux-x86_64",
|
|
"aarch64": "linux-aarch64",
|
|
"riscv64": "linux64-riscv64",
|
|
}
|
|
|
|
|
|
def configure(self):
|
|
target = ossl_targets.get(self.profile["arch"])
|
|
if target is None:
|
|
raise ValueError(f"openssl: unsupported arch {self.profile['arch']}")
|
|
|
|
self.run(
|
|
self.source_dir / "Configure",
|
|
target,
|
|
f"--prefix={self.profile['prefix']}",
|
|
"--openssldir=/etc/ssl",
|
|
"--libdir=lib",
|
|
"shared",
|
|
"zlib",
|
|
"no-tests",
|
|
"no-static-engine",
|
|
"enable-ktls",
|
|
env={
|
|
"CC": f"{self.triple}-gcc",
|
|
"AR": f"{self.triple}-ar",
|
|
"RANLIB": f"{self.triple}-ranlib",
|
|
"CFLAGS": self.profile["cflags"],
|
|
"LDFLAGS": self.profile["ldflags"],
|
|
},
|
|
)
|
|
|
|
|
|
def build(self):
|
|
self.run("make", f"-j{self.jobs}")
|
|
|
|
|
|
def install(self):
|
|
self.run(
|
|
"make", "install_sw", "install_ssldirs", env={"DESTDIR": str(self.dest_dir)}
|
|
)
|