xref: /OK3568_Linux_fs/buildroot/package/util-linux/util-linux-libs/util-linux-libs.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# util-linux-libs
4#
5################################################################################
6
7# Please keep this file as similar as possible to util-linux.mk
8
9UTIL_LINUX_LIBS_VERSION = $(UTIL_LINUX_VERSION)
10UTIL_LINUX_LIBS_SOURCE = $(UTIL_LINUX_SOURCE)
11UTIL_LINUX_LIBS_SITE = $(UTIL_LINUX_SITE)
12UTIL_LINUX_LIBS_DL_SUBDIR = $(UTIL_LINUX_DL_SUBDIR)
13UTIL_LINUX_LIBS_CPE_ID_VENDOR = $(UTIL_LINUX_CPE_ID_VENDOR)
14UTIL_LINUX_LIBS_CPE_ID_PRODUCT = $(UTIL_LINUX_CPE_ID_PRODUCT)
15
16# README.licensing claims that some files are GPL-2.0 only, but this is not
17# true. Some files are GPL-3.0+ but only in tests and optionally in hwclock
18# (but we disable that option). rfkill uses an ISC-style license.
19UTIL_LINUX_LIBS_LICENSE = LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
20UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
21	Documentation/licenses/COPYING.BSD-3-Clause \
22	Documentation/licenses/COPYING.LGPL-2.1-or-later
23
24UTIL_LINUX_LIBS_INSTALL_STAGING = YES
25UTIL_LINUX_LIBS_DEPENDENCIES = \
26	host-pkgconf \
27	$(TARGET_NLS_DEPENDENCIES)
28UTIL_LINUX_LIBS_CONF_OPTS += \
29	--disable-rpath \
30	--disable-makeinstall-chown
31
32UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS)
33
34# Prevent the installation from attempting to move shared libraries from
35# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
36# the same when merged usr is in use.
37ifeq ($(BR2_ROOTFS_MERGED_USR),y)
38UTIL_LINUX_LIBS_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
39endif
40
41# systemd depends on util-linux-libs so we disable systemd support
42UTIL_LINUX_LIBS_CONF_OPTS += \
43	--without-systemd \
44	--with-systemdsystemunitdir=no
45
46# systemd/eudev depend on util-linux-libs so we disable udev support
47UTIL_LINUX_LIBS_CONF_OPTS += --without-udev
48
49# No libs use wchar
50UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar
51
52# No libs use ncurses
53UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses
54
55# Unfortunately, the util-linux does LIBS="" at the end of its
56# configure script. So we have to pass the proper LIBS value when
57# calling the configure script to make configure tests pass properly,
58# and then pass it again at build time.
59UTIL_LINUX_LIBS_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
60UTIL_LINUX_LIBS_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)"
61
62# libmount optionally uses selinux
63ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT)$(BR2_PACKAGE_LIBSELINUX),yy)
64UTIL_LINUX_LIBS_DEPENDENCIES += libselinux
65UTIL_LINUX_LIBS_CONF_OPTS += --with-selinux
66else
67UTIL_LINUX_LIBS_CONF_OPTS += --without-selinux
68endif
69
70# Disable utilities
71UTIL_LINUX_LIBS_CONF_OPTS += \
72	--disable-all-programs \
73	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \
74	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \
75	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \
76	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \
77	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid)
78
79# libmount python bindings are separate, will be installed by full util-linux
80UTIL_LINUX_LIBS_CONF_OPTS += --without-python --disable-pylibmount
81
82# No libs use readline
83UTIL_LINUX_LIBS_CONF_OPTS += --without-readline
84
85# No libs use audit
86UTIL_LINUX_LIBS_CONF_OPTS += --without-audit
87
88# No libs use libmagic
89UTIL_LINUX_LIBS_CONF_OPTS += --without-libmagic
90
91$(eval $(autotools-package))
92