easyblock = 'CMakeMake'

name = 'snappy'
version = '1.1.7'

homepage = 'https://github.com/google/snappy'
description = """Snappy is a compression/decompression library. It does not aim
for maximum compression, or compatibility with any other compression library;
instead, it aims for very high speeds and reasonable compression."""

toolchain = {'name': 'foss', 'version': '2017b'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/google/snappy/archive/']
sources = ['%(version)s.tar.gz']
checksums = ['3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4']

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

# make sure both static and shared libs are built
configopts = [
    "-DBUILD_SHARED_LIBS=OFF ",
    "-DBUILD_SHARED_LIBS=ON ",
]

sanity_check_paths = {
    'files': ['lib64/libsnappy.a'],
    'dirs': ['include']
}

moduleclass = 'lib'
