easyblock = 'MakeCp'

name = 'pigz'
version = '2.4'

homepage = 'http://zlib.net/pigz/'

description = """
 pigz, which stands for parallel implementation of gzip, is a fully
 functional replacement for gzip that exploits multiple processors and multiple
 cores to the hilt when compressing data. pigz was written by Mark Adler, and
 uses the zlib and pthread libraries.
"""

toolchain = {'name': 'GCC', 'version': '6.3.0-2.27'}

source_urls = ['http://zlib.net/pigz/']
sources = [SOURCE_TAR_GZ]

# Patch Makefile so zlib provided by EasyBuild is picked up
patches = ['%(name)s-%(version)s_Makefile.patch']

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

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

parallel = 1

files_to_copy = [(["pigz", "unpigz"], "bin")]

sanity_check_paths = {
    'files': ['bin/pigz', 'bin/unpigz'],
    'dirs': [],
}

moduleclass = 'tools'
