easyblock = 'CMakeMake'

name = 'MariaDB'
version = '5.5.29'

homepage = 'https://mariadb.org/'
description = """MariaDB An enhanced, drop-in replacement for MySQL."""

toolchain = {'name': 'ictce', 'version': '4.1.13'}

sources = [SOURCELOWER_TAR_GZ]

# this is fixed in intel 2013 series
patches = ['define_unreachable_builtin.patch']

dependencies = [
    ('ncurses', '5.9'),
    ('libreadline', '6.2'),
]

builddependencies = [('CMake', '2.8.4')]

configopts = "-DCURSES_LIBRARY=$EBROOTNCURSES/lib/libncurses.so -DCURSES_INCLUDE_PATH=$EBROOTNCURSES/include"
buildopts = "VERBOSE=1"

sanity_check_paths = {
    'files': ['bin/mysql', 'bin/mysqld_safe', 'lib/libmysqlclient.%s' % SHLIB_EXT, 'scripts/mysql_install_db'],
    'dirs': ['include', 'share'],
}

moduleclass = 'data'
