[buildout]
extends =
  ../perl/buildout.cfg
  ../ncurses/buildout.cfg
  ../libcap-ng/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../xz-utils/buildout.cfg

[gcc]
min_version = 8

[util-linux]
recipe = slapos.recipe.cmmi
shared = true
url = https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-2.39.2.tar.xz
md5sum = 2feb3e7c306f336a3d22a182dfffc942
configure-options =
  --disable-static
  --enable-libuuid
  --disable-agetty
  --disable-bash-completion
  --disable-cal
  --disable-cramfs
  --disable-fallocate
  --disable-fsck
  --enable-libblkid
  --disable-libfdisk
  --enable-libmount
  --disable-makeinstall-chown
  --disable-makeinstall-setuid
  --disable-more
  --enable-mount
  --disable-nls
  --disable-pivot_root
  --disable-pylibmount
  --disable-rename
  --disable-schedutils
  --disable-setterm
  --enable-libsmartcols
  --disable-switch_root
  --without-tinfo
  --disable-tls
  --disable-ul
  --enable-unshare
  --disable-uuidd
  --disable-wall
  --without-libiconv-prefix
  --without-libintl-prefix
  --without-slang
  --without-selinux
  --without-audit
  --with-cap-ng=${libcap-ng:location}
environment =
  PATH=${perl:location}/bin:${xz-utils:location}/bin:${pkgconfig:location}/bin:%(PATH)s
  LDFLAGS=-L${libcap-ng:location}/lib -Wl,-rpath=${libcap-ng:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
  CFLAGS=-I${libcap-ng:location}/include -I${ncurses:location}/include
  PKG_CONFIG_PATH=${ncurses:location}/lib/pkgconfig

[libuuid]
# libuuid is inside util-linux source code with only libuuid feature enabled.
<= util-linux
configure-options =
  --disable-static
  --disable-all-programs
  --enable-libuuid
  --without-libiconv-prefix
  --without-libintl-prefix
  --without-slang
  --without-pam
  --without-selinux
  --without-audit

environment =
  PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
  LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
  CFLAGS=-I${ncurses:location}/include