[buildout]
parts =
  nano

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

[nano]
recipe = slapos.recipe.cmmi
url = http://www.nano-editor.org/dist/v2.8/nano-2.8.4.tar.xz
md5sum = 02ff28870194178595b287fc16fa611b
# 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
  LDFLAGS=-L${file:location}/lib/ -Wl,-rpath=${file:location}/lib/
location = ${buildout:parts-directory}/${:_buildout_section_name_}
post-install =
  cd ${:location} && mkdir etc &&
  echo include "${:location}/share/nano/*.nanorc" > etc/nanorc
