[buildout]
extends =
  ../nftables/buildout.cfg
  ../util-linux/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../openssl/buildout.cfg
  ../zlib/buildout.cfg


parts =
  miniupnpd

[miniupnp-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/miniupnp/miniupnp.git
revision = miniupnpd_2_3_0
git-executable = ${git:location}/bin/git


[miniupnpd]
recipe = slapos.recipe.cmmi
shared = true
path = ${miniupnp-repository:location}/miniupnpd
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
  LDFLAGS=-L${libuuid:location}/lib -L${openssl:location}/lib -L${zlib:location}/lib
# because these configure not support prefix syntax
configure-command = ./configure
configure-options =
  --firewall=iptables
make-options =
  -f Makefile.linux
make-targets =
  install PREFIX=%(location)s
