buildout.cfg 1.58 KB
[buildout]
extends =
  ../alsa/buildout.cfg
  ../xorg/buildout.cfg
  ../fontconfig/buildout.cfg
  ../dbus/buildout.cfg
  ../gtk-2/buildout.cfg
  ../libpng/buildout.cfg

parts =
  firefox

[firefox]
recipe = slapos.recipe.build
slapos_promise =
  file:firefox
  file:firefox-bin

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

x86 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/linux-i686/fr/firefox-7.0.1.tar.bz2 42c2559892f26ed2a0563faaf693a00f
x86-64 = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/7.0.1/linux-x86_64/en-US/firefox-7.0.1.tar.bz2 20d6c8e3dfc97d08d1dec7d0479f924f

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", "firefox-slapos")
  wrapper = open(wrapper_location, 'w')
  wrapper.write("""#!/bin/sh
  cd %(location)s
  export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng:location}/lib:${libSM:location}/lib:${libICE:location}/lib:${alsa:location}/lib:%(location)s
  export PATH=${fontconfig:location}/bin:$PATH
  %(location)s/firefox $*""")
  wrapper.close()
  os.chmod(wrapper_location, 0777)