[buildout]
extends =
  ../readline/buildout.cfg

parts =
  lua

[lua]
recipe = slapos.recipe.cmmi
shared = true
url = http://www.lua.org/ftp/lua-5.4.3.tar.gz
md5sum = ef63ed2ecfb713646a7fcc583cf5f352
configure-command = true
make-options =
  "$(uname -sr 2>/dev/null|grep -Eq '^Linux' && echo linux || echo posix)"
  MYCFLAGS="-I${readline:location}/include -fPIC"
  MYLDFLAGS="-L${readline:location}/lib -Wl,-rpath=${readline:location}/lib"
  INSTALL_TOP=@@LOCATION@@
post-install =
  mkdir -p %(location)s/lib/pkgconfig
  {
    make pc INSTALL_TOP=%(location)s
    echo '%(pc)s'
  } > %(location)s/lib/pkgconfig/lua.pc
pc =
  Name: Lua
  Description: Lua language engine
  Version: $${version}
  Libs: -L$${libdir} -llua
  Cflags: -I$${includedir}

[lua5.2]
recipe = slapos.recipe.cmmi
shared = true
url = http://www.lua.org/ftp/lua-5.2.3.tar.gz
md5sum = dc7f94ec6ff15c985d2d6ad0f1b35654
configure-command = true
make-options =
  "$(uname -sr 2>/dev/null|grep -Eq '^Linux' && echo linux || echo posix)"
  MYCFLAGS="-I${readline:location}/include -fPIC"
  MYLDFLAGS="-L${readline:location}/lib -Wl,-rpath=${readline:location}/lib"
  INSTALL_TOP=@@LOCATION@@
post-install =
  mkdir -p %(location)s/lib/pkgconfig
  {
    make pc INSTALL_TOP=%(location)s
    echo '%(pc)s'
  } > %(location)s/lib/pkgconfig/lua.pc
pc =
  Name: Lua
  Description: Lua language engine
  Version: $${version}
  Libs: -L$${libdir} -llua
  Cflags: -I$${includedir}
