buildout.cfg 841 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
[buildout]
extends =
  ../dash/buildout.cfg
  ../curl/buildout.cfg

parts +=
  onlyoffice-x2t

[onlyoffice-x2t]
recipe = slapos.recipe.build

url = https://lab.nexedi.com/tc/bin/raw/fc3af671d3b19e9d25b40326373222b601f23edc/onlyoffice-x2t-part.tar.gz
md5sum = 3e08a8b1345c301078cdce3a7f7360b2

# script to install.
script =
  location = %(location)r
  self.failIfPathExists(location)
  import sys
  extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
  shutil.move(extract_dir, location)
  wrapper_location = os.path.join("%(location)s", "x2t")
  wrapper = open(wrapper_location, 'w')
  wrapper.write('''#!${dash:location}/bin/dash
  cd %(location)s
  export LD_LIBRARY_PATH=%(location)s/lib:${curl:location}/lib
  exec %(location)s/bin/x2t "$@"''')
  wrapper.close()
  os.chmod(wrapper_location, 0755)