easyblock = 'EB_OpenSSL_wrapper'

name = 'OpenSSL'
version = '1.1'
minimum_openssl_version = '1.1.1'

homepage = 'https://www.openssl.org/'
description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured,
 and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) 
 protocols as well as a full-strength general purpose cryptography library. """

toolchain = SYSTEM
toolchainopts = {'pic': True}

osdependencies = ['perl']

builddependencies = [('pkg-config', '0.29.2')]

# This easyconfig will wrap the OpenSSL installation in the host system.
# If the system provides the required binary, header files, and libraries for
# this version of OpenSSL, the installation directory of this module will be
# populated with symlinks to the system files. The minimum required version of
# OpenSSL can be finely controled with 'minimum_openssl_version' (defaults to
# easyconfig version).
# If the host system does not have this version of OpenSSL (or with the option
# wrap_system_openssl = False), EasyBuild will fall back to the following
# component list, which will be build and installed as usual.

components = [
    (name, '1.1.1m', {
        'easyblock': 'EB_OpenSSL',
        'source_urls': ['https://www.openssl.org/source/'],
        'sources': [SOURCELOWER_TAR_GZ],
        #'checksums': ['892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5'],
        'start_dir': '%(namelower)s-%(version)s',
    }),
]

moduleclass = 'system'
