# jsl - command line javascript lint
# http://javascriptlint.com/

[buildout]
parts = jsl

[jsl]
recipe = slapos.recipe.build
url = http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz
md5sum = 2b94ffa4fab07acabe0c5e73cd49bcdf
init =
  import os
# Bypass slapos gcc if any because slapos ld can't find -lm (why?).
  self.path = os.environ['PATH']
install =
  import os
  import sys
  url = options['url']
  md5sum = options['md5sum']
  extract_dir = self.extract(self.download(url, md5sum))
  workdir = guessworkdir(extract_dir)
  call(('make', '-f', 'Makefile.ref', '-j1', 'DIST=' + location, 'all', 'export'),
    cwd=os.path.join(workdir, 'src'), env=dict(os.environ, PATH=self.path))
