rpm.mk 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ################################################################################
  2. #
  3. # rpm
  4. #
  5. ################################################################################
  6. RPM_VERSION_MAJOR = 4.16
  7. RPM_VERSION = $(RPM_VERSION_MAJOR).0
  8. RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
  9. RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
  10. RPM_DEPENDENCIES = \
  11. host-pkgconf \
  12. $(if $(BR2_PACKAGE_BZIP2),bzip2) \
  13. $(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
  14. file \
  15. popt \
  16. $(if $(BR2_PACKAGE_XZ),xz) \
  17. zlib \
  18. $(TARGET_NLS_DEPENDENCIES)
  19. RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
  20. RPM_LICENSE_FILES = COPYING
  21. RPM_CONF_OPTS = \
  22. --disable-python \
  23. --disable-rpath \
  24. --with-external-db \
  25. --with-gnu-ld \
  26. --without-hackingdocs \
  27. --without-lua
  28. ifeq ($(BR2_PACKAGE_ACL),y)
  29. RPM_DEPENDENCIES += acl
  30. RPM_CONF_OPTS += --with-acl
  31. else
  32. RPM_CONF_OPTS += --without-acl
  33. endif
  34. ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
  35. RPM_DEPENDENCIES += berkeleydb
  36. RPM_CONF_OPTS += --enable-bdb
  37. else
  38. RPM_CONF_OPTS += --disable-bdb
  39. endif
  40. ifeq ($(BR2_PACKAGE_DBUS),y)
  41. RPM_DEPENDENCIES += dbus
  42. RPM_CONF_OPTS += --enable-plugins
  43. else
  44. RPM_CONF_OPTS += --disable-plugins
  45. endif
  46. ifeq ($(BR2_PACKAGE_LIBCAP),y)
  47. RPM_DEPENDENCIES += libcap
  48. RPM_CONF_OPTS += --with-cap
  49. else
  50. RPM_CONF_OPTS += --without-cap
  51. endif
  52. ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
  53. RPM_DEPENDENCIES += libgcrypt
  54. RPM_CONF_OPTS += --with-crypto=libgcrypt
  55. else ifeq ($(BR2_PACKAGE_LIBNSS),y)
  56. RPM_DEPENDENCIES += libnss
  57. RPM_CONF_OPTS += --with-crypto=nss
  58. RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr
  59. else ifeq ($(BR2_PACKAGE_BEECRYPT),y)
  60. RPM_DEPENDENCIES += beecrypt
  61. RPM_CONF_OPTS += --with-crypto=beecrypt
  62. RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/beecrypt
  63. else
  64. RPM_DEPENDENCIES += openssl
  65. RPM_CONF_OPTS += --with-crypto=openssl
  66. endif
  67. ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
  68. RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
  69. else
  70. RPM_CONF_OPTS += --without-libintl-prefix
  71. endif
  72. ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
  73. RPM_DEPENDENCIES += libarchive
  74. RPM_CONF_OPTS += --with-archive
  75. else
  76. RPM_CONF_OPTS += --without-archive
  77. endif
  78. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  79. RPM_DEPENDENCIES += libselinux
  80. RPM_CONF_OPTS += --with-selinux
  81. else
  82. RPM_CONF_OPTS += --without-selinux
  83. endif
  84. ifeq ($(BR2_PACKAGE_SQLITE),y)
  85. RPM_DEPENDENCIES += sqlite
  86. RPM_CONF_OPTS += --enable-sqlite
  87. else
  88. RPM_CONF_OPTS += --disable-sqlite
  89. endif
  90. ifeq ($(BR2_PACKAGE_ZSTD),y)
  91. RPM_DEPENDENCIES += zstd
  92. RPM_CONF_OPTS += --enable-zstd
  93. else
  94. RPM_CONF_OPTS += --disable-zstd
  95. endif
  96. ifeq ($(BR2_TOOLCHAIN_HAS_OPENMP),y)
  97. RPM_CONF_OPTS += --enable-openmp
  98. else
  99. RPM_CONF_OPTS += --disable-openmp
  100. endif
  101. # ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
  102. RPM_CONF_ENV = \
  103. ac_cv_prog_cc_c99='-std=gnu99' \
  104. CFLAGS="$(TARGET_CFLAGS) $(RPM_CFLAGS)" \
  105. LIBS=$(TARGET_NLS_LIBS)
  106. $(eval $(autotools-package))