[buildout]
parts =
  nano

extends =
  ../file/buildout.cfg
  ../zlib/buildout.cfg
  ../ncurses/buildout.cfg

[nano]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.nano-editor.org/dist/v6/nano-6.2.tar.xz
md5sum = 12784a5c245518d7580125ebbd6b7601
# The dummy PKG_CONFIG is in the case that both pkg-config and ncursesw
# are installed on the system.
environment=
  PKG_CONFIG=false
  NCURSESW_CONFIG=${ncurses:location}/bin/ncursesw6-config
  CPPFLAGS=-I${file:location}/include -I${zlib:location}/include
  LDFLAGS=-L${file:location}/lib/ -Wl,-rpath=${file:location}/lib/ -L${zlib:location}/lib/ -Wl,-rpath=${zlib:location}/lib/
post-install =
  cd %(location)s
  mkdir etc
  echo 'include %(location)s/share/nano/*.nanorc' > etc/nanorc
