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