xref: /OK3568_Linux_fs/buildroot/package/rpm/rpm.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# rpm
4#
5################################################################################
6
7RPM_VERSION_MAJOR = 4.17
8RPM_VERSION = $(RPM_VERSION_MAJOR).0
9RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
10RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
11RPM_DEPENDENCIES = \
12	host-pkgconf \
13	$(if $(BR2_PACKAGE_BZIP2),bzip2) \
14	$(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
15	file \
16	lua \
17	popt \
18	$(if $(BR2_PACKAGE_XZ),xz) \
19	zlib \
20	$(TARGET_NLS_DEPENDENCIES)
21RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
22RPM_LICENSE_FILES = COPYING
23RPM_CPE_ID_VENDOR = rpm
24RPM_SELINUX_MODULES = rpm
25
26# Don't set --{dis,en}-openmp as upstream wants to abort the build if
27# --enable-openmp is provided and OpenMP is < 4.5:
28# https://github.com/rpm-software-management/rpm/pull/1433
29RPM_CONF_OPTS = \
30	--disable-python \
31	--disable-rpath \
32	--with-gnu-ld
33
34ifeq ($(BR2_PACKAGE_ACL),y)
35RPM_DEPENDENCIES += acl
36RPM_CONF_OPTS += --with-acl
37else
38RPM_CONF_OPTS += --without-acl
39endif
40
41ifeq ($(BR2_PACKAGE_AUDIT),y)
42RPM_DEPENDENCIES += audit
43RPM_CONF_OPTS += --with-audit
44else
45RPM_CONF_OPTS += --without-audit
46endif
47
48ifeq ($(BR2_PACKAGE_DBUS),y)
49RPM_DEPENDENCIES += dbus
50RPM_CONF_OPTS += --enable-plugins
51else
52RPM_CONF_OPTS += --disable-plugins
53endif
54
55ifeq ($(BR2_PACKAGE_LIBCAP),y)
56RPM_DEPENDENCIES += libcap
57RPM_CONF_OPTS += --with-cap
58else
59RPM_CONF_OPTS += --without-cap
60endif
61
62ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
63RPM_DEPENDENCIES += libgcrypt
64RPM_CONF_OPTS += --with-crypto=libgcrypt
65else
66RPM_DEPENDENCIES += openssl
67RPM_CONF_OPTS += --with-crypto=openssl
68endif
69
70ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
71RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
72else
73RPM_CONF_OPTS += --without-libintl-prefix
74endif
75
76ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
77RPM_DEPENDENCIES += libselinux
78RPM_CONF_OPTS += --with-selinux
79else
80RPM_CONF_OPTS += --without-selinux
81endif
82
83ifeq ($(BR2_PACKAGE_SQLITE),y)
84RPM_DEPENDENCIES += sqlite
85RPM_CONF_OPTS += --enable-sqlite
86else
87RPM_CONF_OPTS += --disable-sqlite
88endif
89
90ifeq ($(BR2_PACKAGE_ZSTD),y)
91RPM_DEPENDENCIES += zstd
92RPM_CONF_OPTS += --enable-zstd
93else
94RPM_CONF_OPTS += --disable-zstd
95endif
96
97ifeq ($(BR2_PACKAGE_RPM_RPM2ARCHIVE),y)
98RPM_DEPENDENCIES += libarchive
99RPM_CONF_OPTS += --with-archive
100else
101RPM_CONF_OPTS += --without-archive
102endif
103
104# ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
105RPM_CONF_ENV = \
106	ac_cv_prog_cc_c99='-std=gnu99' \
107	CFLAGS="$(TARGET_CFLAGS) $(RPM_CFLAGS)" \
108	LIBS=$(TARGET_NLS_LIBS)
109
110$(eval $(autotools-package))
111