Commit 2bea3403 authored by Łukasz Nowak's avatar Łukasz Nowak

Drop specific z3c.recipe.openoffice.

slapos.recipe.build allows to install openoffice in same way as z3c.recipe.openoffice.
Additionaly it does not hardcode internally paths or binaries, so less code
updates are needed.
parent e7c3a58f
[buildout]
extends = ../cpio/buildout.cfg
extends =
../cpio/buildout.cfg
../rpm2cpio/buildout.cfg
parts =
libreoffice-bin
......@@ -8,17 +11,36 @@ find-links =
versions = versions
[versions]
# special version of z3c.recipe.openoffice with architecture autodetection
z3c.recipe.openoffice = 0.3.1dev9
[libreoffice-bin]
recipe = z3c.recipe.openoffice
install-javafilter = no
install-pyuno-egg = no
hack-openoffice-python = no
flavour = libreoffice
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
base-url = http://download.documentfoundation.org/libreoffice/stable/3.4.3/rpm/%s/LibO_3.4.3_Linux_%s_install-rpm_en-US.tar.gz
url = http://download.documentfoundation.org/libreoffice/stable/3.4.3/rpm/%s/LibO_3.4.3_Linux_%s_install-rpm_en-US.tar.gz
# supported architectures md5sums
md5sum_x86 = ae1b2b387dcef513c378cc95b255affc
md5sum_x86-64 = b2d6a902182c1af82ca088fbb665d0e3
# where office code can be found?
officedir = libreoffice3.4
# script to install
script =
location = %(location)r
self.failIfPathExists(location)
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
platform = guessPlatform()
url = self.options['url'] %% (ARCH_DIR_MAP[platform], platform)
md5sum = self.options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
storagedir = os.path.join(workdir, 'storage')
os.mkdir(storagedir)
rpmsdir = os.path.join(workdir, [q for q in os.listdir(workdir) if q == 'RPMS'][0])
rpmlist = [os.path.join(rpmsdir, q) for q in os.listdir(rpmsdir) if q.endswith('.rpm') and 'javafilter' not in q and 'xsltfilter' not in q]
[self.pipeCommand([[sys.executable, '${:rpm2cpio}', rpm], ['${:cpio}', '-idum']], cwd=storagedir) for rpm in rpmlist]
self.copyTree(os.path.join(storagedir, 'opt', '${:officedir}'), location, ['basis3.4', 'basis3.3', 'ure'])
# helper binaries
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
[buildout]
parts =
rpm2cpio
[rpm2cpio]
recipe = slapos.recipe.download
url = http://ruda.googlecode.com/hg/rpm/rpm2cpio.py
md5sum = 06001f57616581312f9599e104f2473a
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