Remove useless part and update application part.
[slapos.git] / software / MediaWiki / 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   mediawiki-patch
12   patch
13
14
15 extends =
16   ../../stack/lamp.cfg
17   ../../stack/shacache-client.cfg
18
19 [mediawiki-patch]
20 recipe = slapos.recipe.download
21 url = ${:_profile_base_location_}/patch/mediawiki-1.17.0.config.patch
22 md5sum = fd606666ac9fc54cb84cda8cf08edef4
23 download-only = True
24 location = ${buildout:parts-directory}/${:_buildout_section_name_}
25 filename = mediawiki-1.17.0.config.patch
26
27 [application]
28 recipe = slapos.recipe.build
29 url = http://download.wikimedia.org/mediawiki/1.17/mediawiki-1.17.0.tar.gz
30 md5sum = 871a00a8eb6dcae1b7b654ae635af7cd
31 script =
32   if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
33   extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
34   workdir = guessworkdir(extract_dir)
35   self.copyTree(workdir, "${buildout:parts-directory}/${:_buildout_section_name_}")
36
37 [patch]
38 recipe = iw.recipe.cmd
39 on_install = true
40 on_update = true
41 cmds= patch -d ${application:location} -p1 < ${mediawiki-patch:location}/${mediawiki-patch:filename}
42   
43 [instance-recipe]
44 egg = slapos.cookbook
45 module = lamp.simple
46
47 [template]
48 # Default template for the instance.
49 recipe = slapos.recipe.template
50 url = ${:_profile_base_location_}/instance.cfg
51 #md5sum = Student shall put md5 of instance.cfg here
52 output = ${buildout:directory}/template.cfg
53 mode = 0644
54
55 [instance-recipe-egg]
56 recipe = zc.recipe.egg
57 python = python2.7
58 eggs = ${instance-recipe:egg}
59
60 [versions]
61 # Use SlapOS patched zc.buildout
62 zc.buildout = 1.5.3-dev-SlapOS-010
63
64 [downloadcache-workaround]
65 # workaround irritating problem of hexagonit.recipe.cmmi which automatically
66 # creates download cache, which in turn switches builout to "semi-offline" mode
67 recipe = plone.recipe.command
68 # in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
69 # to ${buildout:directory}/downloads but this variable is available late, that's
70 # why it is hardcoded only for required case
71 download-cache = ${buildout:directory}/downloads
72 command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
73 update-command = ${:command}
74 stop-on-error = True
75