easyblock = 'ConfigureMake'

name = 'glibc'
version = '2.26'

homepage = 'https://www.gnu.org/software/libc/'
description = """The GNU C Library project provides the core libraries for the GNU system and GNU/Linux systems,
 as well as many other systems that use Linux as the kernel."""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}

source_urls = ['https://ftp.gnu.org/gnu/glibc/']
sources = ['glibc-%(version)s.tar.xz']
checksums = ['e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd']

builddependencies = [('binutils', '2.28')]

preconfigopts = "mkdir obj && cd obj && "
configure_cmd_prefix = '../'
prebuildopts = "cd obj && "
preinstallopts = prebuildopts

sanity_check_paths = {
    'files': ['bin/ldd', 'lib/libc.a', 'lib/libc.%s' % SHLIB_EXT],
    'dirs': ['etc', 'libexec', 'include', 'sbin', 'share'],
}

moduleclass = 'lib'
