[buildout]
extends = 
  ../openssl/buildout.cfg
  ../readline/buildout.cfg
  ../zlib/buildout.cfg
  ../ncurses/buildout.cfg
  ../perl/buildout.cfg
parts = postgresql

[postgresql]
<= postgresql92

[postgresql-common]
recipe = slapos.recipe.cmmi
configure-options =
  --without-tcl
  --without-perl
  --without-python
  --without-gssapi
  --without-krb5
  --without-pam
  --without-ldap
  --without-bonjour
  --with-openssl
  --without-selinux
  --with-readline
  --without-ossp-uuid
  --without-libxml
  --without-libxslt
# build core PostgreSQL + pg_trgm contrib extension for GitLab
make-targets = install && make -C contrib/pg_trgm/ install
environment =
  CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
  LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${perl:location}/libs-c -Wl,-rpath=${perl:location}/libs-c

[postgresql92]
<= postgresql-common
url = http://ftp.postgresql.org/pub/source/v9.2.18/postgresql-9.2.18.tar.bz2
md5sum = fd175eb5f29557c6ef2eeaf340330f9a
