Commit 34faeff0 authored by Sebastien Robin's avatar Sebastien Robin

add phantomjs component

parent e24dfa3f
[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}
x86 = https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2 2e94dcad7660d24309abe01011461693
x86-64 = https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2 8075fa873d8741c7ae9093c80a589a1f
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()
os.chmod(wrapper_location, 0755)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment