buildout.cfg 5.83 KB
Newer Older
Vivien Alger's avatar
Vivien Alger committed
1
[buildout]
2
extends =
3
  ../alsa/buildout.cfg
4
  ../dbus/buildout.cfg
5
  ../fontconfig/buildout.cfg
6
  ../fonts/buildout.cfg
7
  ../gtk-2/buildout.cfg
8
  ../gtk-3/buildout.cfg
9
  ../libffi/buildout.cfg
10
  ../libpng/buildout.cfg
11
  ../mesa/buildout.cfg
12
  ../p11-kit/buildout.cfg
13
  ../pcre/buildout.cfg
14
  ../xorg/buildout.cfg
15
  ../xz-utils/buildout.cfg
16

Vivien Alger's avatar
Vivien Alger committed
17
parts =
18 19
  firefox-wrapper
  geckodriver
Vivien Alger's avatar
Vivien Alger committed
20

21 22 23
# XXX : Firefox binary tries to find libgnomeui-2.so.0 and it will
# fail to run if exists.

24 25

[firefox-wrapper]
26 27
# Install a firefox wrapper named ${:part} in buildout's bin-directory,
# wrapping firefox installed in [${:part}]
28 29
# This [firefox-wrapper] installs the default firefox with name `firefox` and
# can also be used as a macro to install under a different name.
30
part = firefox
31 32

recipe = slapos.recipe.build
33 34 35 36
location = ${buildout:bin-directory}/${:part}
fonts-conf = ${firefox-default-fonts-conf:rendered}
init =
  self.buildout[options['part']]
37 38
install =
  import os
39
  part = self.buildout[options['part']]
40
  with open(location, 'w') as f:
41
    f.write("""#!/bin/sh -e
42 43 44
  d=%s
  export LD_LIBRARY_PATH=$d:%s
  export PATH=%s:$PATH
45 46
  # BBB use a default fonts.conf for compatibility, but it's software instance
  # responsability to build a fonts.conf with the fonts they want.
47 48 49 50
  [ "$FONTCONFIG_FILE" ] || export FONTCONFIG_FILE=%s
  exec $d/firefox "$@"
  """ % (
    part['location'],
51 52
    ':'.join(part['library'].split()),
    ':'.join(part['path'].split()),
53
    options['fonts-conf'],
54 55 56
  ))
    os.fchmod(f.fileno(), 0o755)

57 58
[firefox-wrapper-78]
<= firefox-wrapper
59
part = firefox-78
60

61 62
[firefox-wrapper-68]
<= firefox-wrapper
63
part = firefox-68
64

65 66
[firefox-wrapper-60]
<= firefox-wrapper
67
part = firefox-60
68

69 70
[firefox-wrapper-52]
<= firefox-wrapper
71
part = firefox-52
72

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
[firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
context =
  key cachedir :cache-dir
  key fonts :fonts
  key includes :includes
fonts =
  ${ipaex-fonts:location}
  ${liberation-fonts:location}
includes =
  ${fontconfig:location}/etc/fonts/conf.d
cache-dir =
  ~/.fontconfig-firefox/
88

89
[firefox]
90 91 92 93 94
# The default installed firefox version when installing firefox-wrapper.
# Note that users must install ${firefox-wrapper:} to have a usable firefox
# installed in ${buildout:bin-directory}.
# Installing ${firefox:} is not enough, because wrapper setting $LD_LIBRARY_PATH
# would not be created.
95 96
<= firefox-68

97 98 99 100 101 102
[firefox-78]
<= firefox-download
version = 78.1.0esr
i686-md5sum = 09595a1b9a99d17a618a51bc1f971e5e
x86_64-md5sum = 06f4d488721ce7229d9a86cb4c6786f3

103
[firefox-68]
104
<= firefox-download
105 106 107
version = 68.0.2esr
i686-md5sum = eaa9e0246eb2a31ccf55c100dc2edd5a
x86_64-md5sum = d22dc17ce0949cdff78009afca6f2043
108

109 110 111 112 113 114
[firefox-60]
<= firefox-download
version = 60.0.2esr
i686-md5sum = ce7c80716036dfb5c2fb1ca2538556ff
x86_64-md5sum = 6fe25d9a3fcc82670320242c9047d1da

115 116 117 118 119
[firefox-52]
<= firefox-download
version = 52.9.0esr
i686-md5sum = 9aa18888b7812670208490609d75c9bc
x86_64-md5sum = 9336d70f45070c743d08e5473b783a7a
120

121
[firefox-download]
122 123 124 125
recipe = slapos.recipe.build
slapos_promise =
  file:firefox

126
url = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/${:_url}/en-US/firefox-${:version}.tar.bz2
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141

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
Boris Kocherov's avatar
Boris Kocherov committed
142
  ${gtk-2:location}/lib
143 144 145 146 147 148 149 150
  ${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
151
  ${util-linux:location}/lib
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
  ${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
172

173
install =
174
  self.copyTree(guessworkdir(self.extract(self.download())), location)
175 176
  ${:post-install}
post-install =
177

178 179 180 181 182 183 184 185 186
[firefox-download:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux-i686
md5sum = ${:i686-md5sum}

[firefox-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux-x86_64
md5sum = ${:x86_64-md5sum}


187
[geckodriver]
188
# Current geckodriver installed as ${buildout:bin-directory}/geckodriver
189 190 191 192 193 194 195
<= geckodriver-0.24.0

[geckodriver-0.24.0]
<= geckodriver-base
version = 0.24.0
i686-md5sum = b88eee754f6c90b01f760f7a453dda95
x86_64-md5sum = 7552b85e43973c84763e212af7cca566
196

197 198 199 200 201 202 203 204 205 206 207
[geckodriver-0.22.0]
<= geckodriver-base
version = 0.22.0
i686-md5sum = 6de7544753fda56fbaa8382dcac99aaa
x86_64-md5sum = 81746200ce5841e00cabf3b8ea7db542

[geckodriver-0.16.1]
<= geckodriver-base
version = 0.16.1
i686-md5sum = not not on github
x86_64-md5sum = 57dfd55d4759d9878eb75b4c0123d00c
208

209 210 211
[geckodriver-base]
# Installs geckodriver ${version}
recipe = slapos.recipe.build
212
url = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-${:_url}.tar.gz
213
location = ${buildout:bin-directory}/${:_buildout_section_name_}
214 215 216 217
install =
  import os, shutil
  extract_dir = self.extract(self.download(options['url'], options['md5sum']))
  shutil.copy(os.path.join(extract_dir, 'geckodriver'), location)
218

219 220 221
[geckodriver-base:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux32
md5sum = ${:i686-md5sum}
222

223 224 225
[geckodriver-base:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux64
md5sum = ${:x86_64-md5sum}