wip
Showing
[buildout] | [buildout] | ||
extends = | extends = | ||
../alsa/buildout.cfg | ../alsa/buildout.cfg | ||
../dash/buildout.cfg | |||
../dbus/buildout.cfg | ../dbus/buildout.cfg | ||
../fontconfig/buildout.cfg | ../fontconfig/buildout.cfg | ||
../gtk-2/buildout.cfg | ../gtk-2/buildout.cfg | ||
... | @@ -16,151 +15,107 @@ extends = | ... | @@ -16,151 +15,107 @@ extends = |
parts = | parts = | ||
firefox | firefox | ||
geckodriver | |||
# XXX : Firefox binary tries to find libgnomeui-2.so.0 and it will | # XXX : Firefox binary tries to find libgnomeui-2.so.0 and it will | ||
# fail to run if exists. | # fail to run if exists. | ||
[firefox] | [firefox] | ||
<= firefox-51 | recipe = slapos.recipe.build | ||
location = ${buildout:bin-directory}/${:_buildout_section_name_} | |||
part = ${firefox-52:location} | |||
script = | |||
firefox = self.options['part'] | |||
part = self.buildout[os.path.basename(firefox)] | |||
with open(%(location)r, 'w') as f: | |||
f.write("""#!/bin/sh -e | |||
cd %%s | |||
|
|||
export LD_LIBRARY_PATH=$PWD:%%s | |||
export PATH=%%s:$PATH | |||
exec ./firefox "$@" 2>/dev/null | |||
|
|||
""" %% ( | |||
firefox, | |||
':'.join(part['library'].split()), | |||
':'.join(part['path'].split()), | |||
)) | |||
os.fchmod(f.fileno(), 0o755) | |||
[firefox-51] | [firefox-52] | ||
recipe = slapos.recipe.build | recipe = slapos.recipe.build | ||
slapos_promise = | slapos_promise = | ||
file:firefox | file:firefox | ||
file:firefox-bin | |||
depends = | version = 52.5.3esr | ||
${liberation-fonts:location} | |||
${ipaex-fonts:location} | |||
version = 51.0.1 | x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 | ||
94d55883cc16715305f0f18a6f8e9e6b | |||
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 | |||
9ead37d114cfdccb90376a35e7ba691e | |||
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 9a5b67e9d759a1e4df004294a24b2b43 | fonts = | ||
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 bd93f2652d1d90d59ae462439a93c85f | ${liberation-fonts:location} | ||
geckodriver_x86 = https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux32.tar.gz b5836f5a944fe9f3ed1a67c7b342c6a7 | ${ipaex-fonts:location} | ||
geckodriver_x86-64 = https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz 4a185d3179862a35104603b9274452e7 | library = | ||
${alsa:location}/lib | |||
${atk:location}/lib | |||
${at-spi2-atk:location}/lib | |||
${at-spi2-core:location}/lib | |||
${bzip2:location}/lib | |||
${cairo:location}/lib | |||
${dbus:location}/lib | |||
${dbus-glib:location}/lib | |||
${fontconfig:location}/lib | |||
${freetype:location}/lib | |||
${gdk-pixbuf:location}/lib | |||
${gettext:location}/lib | |||
${glib:location}/lib | |||
${gtk-3:location}/lib | |||
${harfbuzz:location}/lib | |||
${libepoxy:location}/lib | |||
${libffi:location}/lib | |||
${libICE:location}/lib | |||
${libpng:location}/lib | |||
${libSM:location}/lib | |||
${libtool:location}/lib | |||
${libuuid:location}/lib | |||
${libX11:location}/lib | |||
${libXau:location}/lib | |||
${libxcb:location}/lib | |||
${libXcomposite:location}/lib | |||
${libXcursor:location}/lib | |||
${libXext:location}/lib | |||
${libXi:location}/lib | |||
${libxml2:location}/lib | |||
${libXrender:location}/lib | |||
${libXt:location}/lib | |||
${mesa:location}/lib | |||
${pango:location}/lib | |||
${pcre:location}/lib | |||
${pixman:location}/lib | |||
${xdamage:location}/lib | |||
${xfixes:location}/lib | |||
${xz-utils:location}/lib | |||
${zlib:location}/lib | |||
path = | |||
${fontconfig:location}/bin | |||
script = | script = | ||
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ') | url, md5sum = self.options[guessPlatform()].split() | ||
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum'))) | extract_dir = self.extract(self.download(url, md5sum)) | ||
workdir = guessworkdir(extract_dir) | self.copyTree(guessworkdir(extract_dir), %(location)r) | ||
self.copyTree(workdir, "%(location)s") | |||
geckodriver_url, geckodriver_md5sum = self.options['geckodriver_' + guessPlatform()].split(' ') | |||
extract_dir = self.extract(self.download(geckodriver_url, geckodriver_md5sum)) | |||
shutil.copy(extract_dir + '/geckodriver', "%(location)s") | |||
wrapper_location = os.path.join("%(location)s", "firefox-slapos") | |||
wrapper = open(wrapper_location, 'w') | |||
wrapper.write("""#!${dash:location}/bin/dash | |||
cd %(location)s | |||
export LD_LIBRARY_PATH="%(location)s" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${alsa:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${atk:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${at-spi2-atk:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${at-spi2-core:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${bzip2:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${cairo:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus-glib:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${fontconfig:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${freetype:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gdk-pixbuf:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gettext:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${glib:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gtk-3:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${harfbuzz:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libepoxy:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libffi:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libICE:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libpng:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libSM:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libtool:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libuuid:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libX11:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXau:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxcb:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcomposite:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcursor:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXi:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxml2:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXrender:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXt:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${mesa:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pango:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pcre:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pixman:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xdamage:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xfixes:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xz-utils:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${zlib:location}/lib" | |||
export PATH=${fontconfig:location}/bin:$PATH | |||
exec %(location)s/firefox "$@" 2> /dev/null | |||
""") | |||
wrapper.close() | |||
os.chmod(wrapper_location, 0755) | |||
[firefox-45] | [geckodriver] | ||
recipe = slapos.recipe.build | recipe = slapos.recipe.build | ||
slapos_promise = | location = ${buildout:bin-directory}/${:_buildout_section_name_} | ||
file:firefox | |||
file:firefox-bin | |||
depends = | |||
${liberation-fonts:location} | |||
${ipaex-fonts:location} | |||
version = 45.0.1 | version = 0.17.0 | ||
# MD5SUMs are available at : | x86 = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux32.tar.gz | ||
# https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${:version}/MD5SUMS | 79b1a158f96d29942a111c0905f1c807 | ||
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 3756c8d06d6f915a3dff1dae643ee74b | x86-64 = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz | ||
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 0409177ef649ec90ffe7a421a19bc156 | be18faeea6e7db9db6990d8667e2298f | ||
script = | script = | ||
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ') | url, md5sum = self.options[guessPlatform()].split() | ||
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum'))) | extract_dir = self.extract(self.download(url, md5sum)) | ||
workdir = guessworkdir(extract_dir) | shutil.copy(extract_dir + '/geckodriver', %(location)r) | ||
self.copyTree(workdir, "%(location)s") | |||
wrapper_location = os.path.join("%(location)s", "firefox-slapos") | |||
wrapper = open(wrapper_location, 'w') | |||
wrapper.write("""#!${dash:location}/bin/dash | |||
cd %(location)s | |||
export LD_LIBRARY_PATH="%(location)s" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${alsa:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${atk:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${bzip2:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${cairo:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${dbus-glib:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${fontconfig:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${freetype:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gdk-pixbuf:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gettext:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${glib:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${gtk-2:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${harfbuzz:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libICE:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libSM:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libX11:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXau:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcomposite:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXcursor:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXrender:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXt:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libffi:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libpng:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libtool:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libuuid:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxcb:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libxml2:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${p11-kit:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pango:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pixman:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xdamage:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${xfixes:location}/lib" | |||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${zlib:location}/lib" | |||
export PATH=${fontconfig:location}/bin:$PATH | |||
exec %(location)s/firefox $*""") | |||
wrapper.close() | |||
os.chmod(wrapper_location, 0755) |