Commit ab70c998 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Cédric de Saint Martin

Expose environment as cfg and sh file.

Additionaly use template engine and separate environment definition to own
section.
parent 7c56f4dd
......@@ -23,7 +23,8 @@ extends =
parts =
slapos
environment
cfg-environment
sh-environment
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
......@@ -45,24 +46,36 @@ exec-sitecustomize = false
allowed-eggs-from-site-packages =
[environment]
# Section exposes SlapOS default environment.
# Note: For now original PATH is appeneded to the end, as not all tools are
# provided by SlapOS
recipe = plone.recipe.command
PATH=${bison:location}/bin:${bzip2:location}/bin:${gettext:location}/bin:${glib:location}/bin:${libxml2:location}/bin:${libxslt:location}/bin:${m4:location}/bin:${ncurses:location}/bin:${openssl:location}/bin:${pkgconfig:location}/bin:${python2.7:location}/bin:${readline:location}/bin:${sqlite3:location}/bin:${swig:location}/bin:${buildout:bin-directory}:$PATH
CFLAGS=-I${bzip2:location}/include -I${gdbm:location}/include -I${gettext:location}/include -I${glib:location}/include -I${libxml2:location}/include -I${libxslt:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${popt:location}/include -I${readline:location}/include -I${sqlite3:location}/include -I${zlib:location}/include
CPPFLAGS=${:CFLAGS}
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${libxslt:location}/lib -Wl,-rpath=${libxslt:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${popt:location}/lib/pkgconfig:${python2.7:location}/lib/pkconfig:${sqlite3:location}/lib/pkconfig
command = echo """[environment]
PATH=${:PATH}
CFLAGS=${:CFLAGS}
CPPFLAGS=${:CPPFLAGS}
LDFLAGS=${:LDFLAGS}
PKG_CONFIG_PATH=${:PKG_CONFIG_PATH}
""" > ${buildout:directory}/environment.cfg
update-commnad = ${:command}
[cfg-environment]
# Section exposes SlapOS default environment as configuration file.
recipe = collective.recipe.template
input = inline:
[environment]
PATH=${environment:PATH}
CFLAGS=${environment:CFLAGS}
CPPFLAGS=${environment:CPPFLAGS}
LDFLAGS=${environment:LDFLAGS}
PKG_CONFIG_PATH=${environment:PKG_CONFIG_PATH}
output = ${buildout:directory}/environment.cfg
[sh-environment]
# Section exposes SlapOS default environment as sh file.
recipe = collective.recipe.template
input = inline:
PATH="${environment:PATH}"
CFLAGS="${environment:CFLAGS}"
CPPFLAGS="${environment:CPPFLAGS}"
LDFLAGS="${environment:LDFLAGS}"
PKG_CONFIG_PATH="${environment:PKG_CONFIG_PATH}"
output = ${buildout:directory}/environment.sh
[lxml-python]
python = python2.7
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment