easyblock = 'PackedBinary'

name = 'configurable-http-proxy'
version = '1.3.0'
nodejsver = '4.4.7'
versionsuffix = '-nodejs-%s' % nodejsver

homepage = 'https://github.com/jupyterhub/configurable-http-proxy'
description = """HTTP proxy for node.js including a REST API for updating the routing table.
 Developed as a part of the Jupyter Hub multi-user server."""

toolchain = {'name': 'foss', 'version': '2016a'}

source_urls = ['https://github.com/jupyterhub/configurable-http-proxy/archive/']
sources = ['%(version)s.tar.gz']

dependencies = [
    ('nodejs', nodejsver),
]

preinstallopts = 'cd %(name)s-%(version)s && '
install_cmd = 'npm install --prefix %(installdir)s -g'

sanity_check_paths = {
    'files': ['bin/configurable-http-proxy'],
    'dirs': ['lib/node_modules/configurable-http-proxy'],
}
sanity_check_commands = ['%(name)s --version']

moduleclass = 'tools'
