buildout.cfg 1.25 KB
Newer Older
Sebastien Robin's avatar
Sebastien Robin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[buildout]
extends =
  ../fontconfig/buildout.cfg
  ../libexpat/buildout.cfg
  ../dash/buildout.cfg
parts =
  phantomjs

[phantomjs]
recipe = slapos.recipe.build
slapos_promise =
  file:phantomjs-slapos

depends =
  ${liberation-fonts:location}
  ${ipaex-fonts:location}

18 19
x86 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86-64 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
Sebastien Robin's avatar
Sebastien Robin committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

script =
  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
  workdir = guessworkdir(extract_dir)
  self.copyTree(workdir, "%(location)s")
  wrapper_location = os.path.join("%(location)s", "phantomjs-slapos")
  wrapper = open(wrapper_location, 'w')
  wrapper.write("""#!${dash:location}/bin/dash
  cd %(location)s
  export LD_LIBRARY_PATH=%(location)s:${freetype:location}/lib/:${fontconfig:location}/lib/:${libexpat:location}/lib
  export PATH=${fontconfig:location}/bin:$PATH
  exec %(location)s/bin/phantomjs $*""")
  wrapper.flush()
  wrapper.close()
35
  os.chmod(wrapper_location, 0755)