toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / rpm / rpm.mk
blob2e829d751a25cb859c021d5eced27570034ab0cb
1 ################################################################################
3 # rpm
5 ################################################################################
7 RPM_VERSION = 4.13.0
8 RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
9 RPM_SITE = https://github.com/rpm-software-management/rpm/releases/download/rpm-$(RPM_VERSION)-release
10 RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
11 RPM_LICENSE = GPLv2 or LGPLv2 (library only)
12 RPM_LICENSE_FILES = COPYING
13 RPM_PATCH = \
14 https://github.com/rpm-software-management/rpm/commit/b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch \
15 https://github.com/rpm-software-management/rpm/commit/c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
17 # b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch
18 # c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
19 RPM_AUTORECONF = YES
21 RPM_CONF_OPTS = \
22 --disable-python \
23 --disable-rpath \
24 --with-external-db \
25 --with-gnu-ld \
26 --without-cap \
27 --without-hackingdocs \
28 --without-lua
30 ifeq ($(BR2_PACKAGE_ACL),y)
31 RPM_DEPENDENCIES += acl
32 RPM_CONF_OPTS += --with-acl
33 else
34 RPM_CONF_OPTS += --without-acl
35 endif
37 ifeq ($(BR2_PACKAGE_LIBNSS),y)
38 RPM_DEPENDENCIES += libnss
39 RPM_CONF_OPTS += --without-beecrypt
40 RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr
41 else
42 RPM_DEPENDENCIES += beecrypt
43 RPM_CONF_OPTS += --with-beecrypt
44 RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/beecrypt
45 endif
47 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
48 RPM_DEPENDENCIES += gettext
49 RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
50 else
51 RPM_CONF_OPTS += --without-libintl-prefix
52 endif
54 ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
55 RPM_DEPENDENCIES += libarchive
56 RPM_CONF_OPTS += --with-archive
57 else
58 RPM_CONF_OPTS += --without-archive
59 endif
61 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
62 RPM_DEPENDENCIES += libselinux
63 RPM_CONF_OPTS += --with-selinux
64 else
65 RPM_CONF_OPTS += --without-selinux
66 endif
68 # For the elfutils and binutils dependencies, there are no
69 # configuration options to explicitly enable/disable them.
70 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
71 RPM_DEPENDENCIES += elfutils
72 endif
74 ifeq ($(BR2_PACKAGE_BINUTILS),y)
75 RPM_DEPENDENCIES += binutils
76 endif
78 # RPM, when using NLS, requires GNU gettext's _nl_msg_cat_cntr, which is not
79 # provided in musl.
80 ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
81 RPM_CONF_OPTS += --disable-nls
82 endif
84 # ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
85 RPM_CONF_ENV = \
86 ac_cv_prog_cc_c99='-std=gnu99' \
87 CFLAGS="$(TARGET_CFLAGS) $(RPM_CFLAGS)"
89 $(eval $(autotools-package))