Remove warnings conversion to error on mydumper
[slapos.git] / component / mydumper / buildout.cfg
1 [buildout]
2
3 extends =
4     ../cmake/buildout.cfg
5     ../glib/buildout.cfg
6     ../pcre/buildout.cfg
7     ../mariadb/buildout.cfg
8
9 parts = mydumper
10
11 # XXX-Antoine:
12 # This is really dirty, but it's the only way to install
13 # mydumper that works
14 [mydumper]
15 recipe = slapos.recipe.build
16 url = http://launchpad.net/mydumper/0.2/0.2.3/+download/mydumper-0.2.3.tar.gz
17 md5sum = 36e6a1c97a9634a6882ddaac5e2697d5
18 buildout-bin-dir = ${buildout:bin-directory}
19 cmake-command = ${cmake:location}/bin/cmake
20 mysql-config = ${mariadb:location}/bin/mysql_config
21 doc-dependency = ${mydumper-doc:eggs}
22 mysqllib = ${mariadb:location}/lib
23 pkg-config-path = ${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/
24 libraries = ${zlib:location}/lib/:${glib:location}/lib/:${pcre:location}/lib/:${mariadb:location}/lib/mysql/
25 includes = ${zlib:location}/include/:${glib:location}/include/:${pcre:location}/include/:${mariadb:location}/include/mysql/
26 cflags = -I${zlib:location}/include/ -I${glib:location}/include/ -I${pcre:location}/include/ -I${mariadb:location}/include/mysql/
27 mydumper-patches =
28    ${:_profile_base_location_}/mydumper-remove-warnings-errors.patch 3dcc9594ebe267cdddf8ce00f0a04dbd -p1 -R
29 slapos_promise =
30     directory:bin
31     file:bin/mydumper
32     file:bin/myloader
33 script =
34     import os
35     url = self.download(self.options['url'], self.options.get('md5sum'))
36     extract_dir = self.extract(url)
37     workdir = guessworkdir(extract_dir)
38     self.applyPatchList(self.options['mydumper-patches'], cwd=workdir)
39     env['PATH'] = self.options['buildout-bin-dir'] + ':' + env.get('PATH', '')
40     env['PKG_CONFIG_PATH'] = self.options['pkg-config-path'] + ':' + \
41                              env.get('PKG_CONFIG_PATH', '')
42     env['CMAKE_INCLUDE_PATH'] = self.options['includes']
43     env['CMAKE_LIBRARY_PATH'] = self.options['libraries']
44     env['CFLAGS'] = self.options['cflags']
45     command_line = [self.options['cmake-command'],
46                     '-DCMAKE_INSTALL_PREFIX=%%s' %% self.options['location'],
47                     '-DMYSQL_CONFIG=%%s' %% self.options['mysql-config'],
48                     '-DCMAKE_C_FLAGS=%%s' %% self.options['cflags'],
49                     '-DCMAKE_INSTALL_RPATH=%%s' %% self.options['libraries'],
50                     '.']
51     call(command_line, cwd=workdir, env=env)
52     call(['make'], cwd=workdir, env=env)
53     call(['make', 'install'], cwd=workdir, env=env)
54
55 [mydumper-doc]
56 recipe = zc.recipe.egg
57 eggs =
58     Sphinx
59 dependent-scripts = true
60
61 # XXX-Antoine: here's what I did using hexagonit.recipe.cmmi.
62 # and it wasn't working !
63 #[mydumper]
64 #recipe = hexagonit.recipe.cmmi
65 #url = http://launchpad.net/mydumper/0.2/0.2.3/+download/mydumper-0.2.3.tar.gz
66 #md5sum = 36e6a1c97a9634a6882ddaac5e2697d5
67 #strip-top-level-dir = true
68 #location = ${buildout:parts-directory}/${:_buildout_section_name_}
69 #configure-command =
70 #    ${cmake:location}/bin/cmake \
71 #    -DCMAKE_INSTALL_PREFIX=${:location} \
72 #    -DMYSQL_CONFIG=${mariadb:location}/bin/mysql_config \
73 #    -DCMAKE_INCLUDE_PATH=${zlib:location}/include \
74 #    -DCMAKE_LIBRARY_PATH=${zlib:location}/lib \
75 #    .
76 #environment=
77 #    PATH=$PATH:${buildout:bin-directory}
78 #    PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig/:${pcre:location}/lib/pkgconfig/
79