xref: /OK3568_Linux_fs/buildroot/package/lvm2/lvm2.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# lvm2
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLVM2_VERSION = 2.03.12
8*4882a593SmuzhiyunLVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz
9*4882a593SmuzhiyunLVM2_SITE = http://sources.redhat.com/pub/lvm2
10*4882a593SmuzhiyunLVM2_INSTALL_STAGING = YES
11*4882a593SmuzhiyunLVM2_LICENSE = GPL-2.0, LGPL-2.1
12*4882a593SmuzhiyunLVM2_LICENSE_FILES = COPYING COPYING.LIB
13*4882a593SmuzhiyunLVM2_CPE_ID_PRODUCT = redhat
14*4882a593Smuzhiyun# parallel build issues
15*4882a593SmuzhiyunLVM2_MAKE = $(MAKE1)
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun# Make sure that binaries and libraries are installed with write
18*4882a593Smuzhiyun# permissions for the owner. We disable NLS because it's broken, and
19*4882a593Smuzhiyun# the package anyway doesn't provide any translation files.
20*4882a593SmuzhiyunLVM2_CONF_OPTS += \
21*4882a593Smuzhiyun	--enable-write_install \
22*4882a593Smuzhiyun	--enable-pkgconfig \
23*4882a593Smuzhiyun	--enable-cmdlib \
24*4882a593Smuzhiyun	--enable-dmeventd \
25*4882a593Smuzhiyun	--disable-nls \
26*4882a593Smuzhiyun	--with-symvers=no
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunLVM2_DEPENDENCIES += host-pkgconf libaio
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun# LVM2 uses autoconf, but not automake, and the build system does not
31*4882a593Smuzhiyun# take into account the toolchain passed at configure time.
32*4882a593SmuzhiyunLVM2_MAKE_ENV = $(TARGET_CONFIGURE_OPTS)
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun# package/readline is GPL-3.0+, so not license compatible
35*4882a593SmuzhiyunLVM2_CONF_OPTS += --disable-readline
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunLVM2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR)
38*4882a593SmuzhiyunLVM2_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR)
39*4882a593Smuzhiyun
40*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_UDEV),y)
41*4882a593SmuzhiyunLVM2_CONF_OPTS += --enable-udev_rules
42*4882a593Smuzhiyunendif
43*4882a593Smuzhiyun
44*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBSELINUX),y)
45*4882a593SmuzhiyunLVM2_CONF_OPTS += --enable-selinux
46*4882a593SmuzhiyunLVM2_DEPENDENCIES += libselinux
47*4882a593Smuzhiyunelse
48*4882a593SmuzhiyunLVM2_CONF_OPTS += --disable-selinux
49*4882a593Smuzhiyunendif
50*4882a593Smuzhiyun
51*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LVM2_STANDARD_INSTALL),y)
52*4882a593SmuzhiyunLVM2_INSTALL_STAGING_OPTS += install
53*4882a593SmuzhiyunLVM2_INSTALL_TARGET_OPTS += install
54*4882a593Smuzhiyunifeq ($(BR2_INIT_SYSTEMD),y)
55*4882a593SmuzhiyunLVM2_INSTALL_TARGET_OPTS += install_systemd_units install_systemd_generators
56*4882a593Smuzhiyunendif
57*4882a593Smuzhiyunelse
58*4882a593SmuzhiyunLVM2_MAKE_OPTS = device-mapper
59*4882a593SmuzhiyunLVM2_INSTALL_STAGING_OPTS += install_device-mapper
60*4882a593SmuzhiyunLVM2_INSTALL_TARGET_OPTS += install_device-mapper
61*4882a593Smuzhiyunendif
62*4882a593Smuzhiyun
63*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
64*4882a593SmuzhiyunLVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no
65*4882a593Smuzhiyunendif
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunHOST_LVM2_DEPENDENCIES = host-pkgconf host-libaio
68*4882a593SmuzhiyunHOST_LVM2_CONF_OPTS = \
69*4882a593Smuzhiyun	--enable-write_install \
70*4882a593Smuzhiyun	--enable-pkgconfig \
71*4882a593Smuzhiyun	--disable-cmdlib \
72*4882a593Smuzhiyun	--disable-dmeventd \
73*4882a593Smuzhiyun	--disable-fsadm \
74*4882a593Smuzhiyun	--disable-readline \
75*4882a593Smuzhiyun	--disable-selinux \
76*4882a593Smuzhiyun	--with-confdir=$(HOST_DIR)/etc
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun$(eval $(autotools-package))
79*4882a593Smuzhiyun$(eval $(host-autotools-package))
80