Merge branch 'master' into webrunner
[slapos.git] / software / piwik / software.cfg
1 [buildout]
2 versions = versions
3
4 parts =
5   template
6   apache-php
7   mariadb
8   eggs
9   instance-recipe-egg
10   downloadcache-workaround
11   
12 extends =
13   ../../stack/lamp.cfg
14   ../../stack/shacache-client.cfg
15
16
17 [application]
18 recipe = slapos.recipe.build
19 url = http://piwik.org/latest.zip
20 md5sum = fd16c7a15573c93feefd1dcba3ca40ba
21 script =
22   if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
23   extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
24   workdir = guessworkdir(extract_dir)
25   self.copyTree(workdir + "/piwik", "${buildout:parts-directory}/${:_buildout_section_name_}")
26
27 [application-template]
28 recipe = slapos.recipe.download
29 url = ${:_profile_base_location_}/template/piwik.inc.php.in
30 #md5sum = Student may put here md5sum of this file, this is good idea
31 download-only = True
32 filename = template.in
33 mode = 0644
34 location = ${buildout:parts-directory}/${:_buildout_section_name_}
35
36 [application-configuration]
37 location = config.inc.php
38   
39 [instance-recipe]
40 egg = slapos.cookbook
41 module = lamp.simple
42
43 [template]
44 # Default template for the instance.
45 recipe = slapos.recipe.template
46 url = ${:_profile_base_location_}/instance.cfg
47 #md5sum = Student shall put md5 of instance.cfg here
48 output = ${buildout:directory}/template.cfg
49 mode = 0644
50
51 [instance-recipe-egg]
52 recipe = zc.recipe.egg
53 python = python2.7
54 eggs = ${instance-recipe:egg}
55
56 [versions]
57 # Use SlapOS patched zc.buildout
58 zc.buildout = 1.5.3-dev-SlapOS-010
59
60 [downloadcache-workaround]
61 # workaround irritating problem of hexagonit.recipe.cmmi which automatically
62 # creates download cache, which in turn switches builout to "semi-offline" mode
63 recipe = plone.recipe.command
64 # in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
65 # to ${buildout:directory}/downloads but this variable is available late, that's
66 # why it is hardcoded only for required case
67 download-cache = ${buildout:directory}/downloads
68 command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
69 update-command = ${:command}
70 stop-on-error = True