Commit 531e0c9a authored by Jérome Perrin's avatar Jérome Perrin

component/phantomjs: use buildout conditional sections

multiarch() is being removed from slapos.recipe.build , it was not
needed because we can achieve this with buildout conditional sections as
we did here.
parent 4900dece
......@@ -10,13 +10,11 @@ recipe = slapos.recipe.build
slapos_promise =
file:phantomjs-slapos
base = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux
i386-linux-gnu = ${:base}-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86_64-linux-gnu = ${:base}-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
url = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux${:url-extension}
install =
import os
extract_dir = self.extract(self.download(*options[multiarch()].split()))
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, location)
with open(os.path.join(location, "phantomjs-slapos"), 'w') as wrapper:
......@@ -27,3 +25,11 @@ install =
exec %(location)s/bin/phantomjs "$@"
""" % options)
os.fchmod(wrapper.fileno(), 0o755)
[phantomjs:bits32]
url-extension = -i686.tar.bz2
md5sum = 9c1426eef5b04679d65198b1bdd6ef88
[phantomjs:bits64]
url-extension = -x86_64.tar.bz2
md5sum = f278996c3edd0e8d8ec4893807f27d71
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