buildout.cfg 2.87 KB
Newer Older
Alain Takoudjou's avatar
Alain Takoudjou committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
[buildout]

parts=
  mariadb
  boinc  

extends =
  ../subversion/buildout.cfg
  ../m4/buildout.cfg
  ../automake/buildout.cfg
  ../libtool/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../openssl/buildout.cfg
  ../cyrus-sasl/buildout.cfg
  ../openldap/buildout.cfg
  ../gnutls/buildout.cfg
  ../mariadb/buildout.cfg
  ../curl/buildout.cfg

#checkout boinc package from svn repository
[boinc-package]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
24
tarball = ${buildout:parts-directory}/boinc.tar.gz
Alain Takoudjou's avatar
Alain Takoudjou committed
25
svnversion = ${subversion:location}/bin/svnversion
26
command = ${subversion:location}/bin/svn co --revision 26162 http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
27 28 29 30
  sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
  sed -i "20i\#include <unistd.h>" ${:location}/tools/process_input_template.cpp && \
  sed -i "25i\#include <unistd.h>" ${:location}/sched/single_job_assimilator.cpp && \
  sed -i "27i\#include <unistd.h>" ${:location}/tools/create_work.cpp && \
31 32
  sed -i 's#--prefix=$(prefix)#--prefix=/$(prefix)#' ${:location}/py/Makefile.am && \
  sed -i 's#parent::base_escape_string#@parent::base_escape_string#' ${:location}/html/inc/boinc_db.inc
33 34
  cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command = 
Alain Takoudjou's avatar
Alain Takoudjou committed
35 36 37 38 39

# Compile now boinc
# When installing boinc python module, path /srv/slapgrid/... is strip to srv/slapgrid... It is why
# we need to set --prefix="/${buildout:parts-directory}/${:_buildout_section_name_}"
[boinc]
40 41
recipe = slapos.recipe.cmmi
url = ${boinc-package:tarball}
Alain Takoudjou's avatar
Alain Takoudjou committed
42 43
keep-compile-dir = true
source = ${buildout:parts-directory}/${:_buildout_section_name_}__compile__
44
configure-command =  
Alain Takoudjou's avatar
Alain Takoudjou committed
45 46 47 48 49
  echo 'AC_PROG_OBJCXX' >> configure.ac
  aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal
  ./_autosetup
  ./configure
configure-options = 
50
  --prefix="${buildout:parts-directory}/${:_buildout_section_name_}"
Alain Takoudjou's avatar
Alain Takoudjou committed
51 52 53 54 55 56 57 58 59 60 61 62 63
  --disable-fcgi
  --disable-shared
  --enable-static
  --disable-manager
  --disable-client
  --with-pkg-config
  --with-ssl=${openssl:location}
  --with-libsasl2=${cyrus-sasl:location}/lib
  --with-libldap=${openldap:location}/lib
  --with-libgnutls=${gnutls:location}/lib
  --with-libcurl=${curl:location}/lib
  --with-x=no

64

Alain Takoudjou's avatar
Alain Takoudjou committed
65 66 67 68 69 70 71 72
environment =
  PATH=${pkgconfig:location}/bin:${automake:location}/bin:${autoconf:location}/bin:${libtool:location}/bin:${subversion:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
  M4=${m4:location}/bin/m4
  CPPFLAGS=-I${openssl:location}/include -I${mariadb:location}/include
  LDFLAGS = -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
  MYSQL_CONFIG=${mariadb:location}/bin/mysql_config
  ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${libtool:location}/share/aclocal
73

Alain Takoudjou's avatar
Alain Takoudjou committed
74