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

[util-linux]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.kernel.org/pub/linux/utils/util-linux/v2.37/util-linux-2.37.2.tar.xz
md5sum = d659bf7cd417d93dc609872f6334b019
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-ncurses
  --without-slang
  --without-selinux
  --without-audit
  --with-cap-ng=${libcap-ng:location}
environment =
  PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
  LDFLAGS=-L${libcap-ng:location}/lib -Wl,-rpath=${libcap-ng:location}/lib
  CFLAGS=-I${libcap-ng:location}/include

[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-ncurses
  --without-slang
  --without-pam
  --without-selinux
  --without-audit

environment =
  PATH=${perl:location}/bin:%(PATH)s
