easyblock = 'ConfigureMake'

name = 'Postgres-XL'
version = '9.5r1'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://www.postgres-xl.org'
description = """Postgres-XL is a horizontally scalable open source SQL database cluster,
flexible enough to handle varying database workloads:"""

toolchain = {'name': 'intel', 'version': '2016a'}

sources = [SOURCELOWER_TAR_BZ2]
source_urls = ['http://files.postgres-xl.org']

osdependencies = [('openssl-devel', 'libssl-dev')]

dependencies = [
    ('libreadline', '6.3'),
    ('zlib', '1.2.8'),
    ('Python', '2.7.11'),
    #    ('OpenSSL', '1.0.1i'), # OS dependency should be preferred for security reasons
]

builddependencies = [
    ('Bison', '3.0.4'),
    ('flex', '2.6.0'),
    ('Perl', '5.22.1'),
]

configopts = '--with-python --with-openssl'

sanity_check_paths = {
    'files': ['bin/psql', 'bin/pg_config', 'lib/libpq.a', 'lib/libpq.%s' % SHLIB_EXT],
    'dirs': ['share/postgresql'],
}

moduleclass = 'data'
