easyblock = 'ConfigureMake'

name = 'libpng'
version = '1.2.58'

homepage = 'http://www.libpng.org/pub/png/libpng.html'

description = "libpng is the official PNG reference library"

toolchain = {'name': 'dummy', 'version': ''}

source_urls = [SOURCEFORGE_SOURCE]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['283f84b0d020589542716ba3c31c5fcf88fb7fd3082a5bbebfc320534c512e1f']

dependencies = [
    ('zlib', '1.2.11'),
]

majminver = ''.join(version.split('.')[:2])

sanity_check_paths = {
    'files': ['include/pngconf.h', 'include/png.h',
              'lib/libpng.a', 'lib/libpng.%s' % SHLIB_EXT,
              'lib/libpng%s.a' % majminver,
              'lib/libpng%s.%s' % (majminver, SHLIB_EXT),
              'lib/libpng%s.%s.0' % (majminver, SHLIB_EXT)],
    'dirs': ['bin', 'include/libpng%s' % majminver, 'share/man'],
}

moduleclass = 'lib'
