package/rpm: introduce rpm2archive option
authorJames Knight <james.d.knight@live.com>
Sat, 4 Sep 2021 20:40:25 +0000 (16:40 -0400)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 11 Sep 2021 20:33:37 +0000 (22:33 +0200)
Adjust the inclusion of the rpm2archive command as an option, to allow a
developer to opt-out of building/including the command if it is not
desired/needed for the target.

Signed-off-by: James Knight <james.d.knight@live.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/rpm/Config.in
package/rpm/rpm.mk

index 9da8d51df0206dd74ad073fd622c7c00e7203319..2af04b41b4be8f779912644245e3ee5f2a3422b8 100644 (file)
@@ -19,3 +19,18 @@ config BR2_PACKAGE_RPM
          The RPM Package Manager (RPM).
 
          http://www.rpm.org/
+
+if BR2_PACKAGE_RPM
+
+comment "rpm2archive support needs a toolchain w/ wchar"
+       depends on !BR2_USE_WCHAR
+
+config BR2_PACKAGE_RPM_RPM2ARCHIVE
+       bool "rpm2archive command"
+       default y
+       depends on BR2_USE_WCHAR
+       select BR2_PACKAGE_LIBARCHIVE
+       help
+         Enable rpm2archive
+
+endif
index e9d2adf690cc0626e209ec7d1acad9c0ecf0a95c..5c04d47f1023fdadcb8bcf15b8826725316bfb39 100644 (file)
@@ -73,13 +73,6 @@ else
 RPM_CONF_OPTS += --without-libintl-prefix
 endif
 
-ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
-RPM_DEPENDENCIES += libarchive
-RPM_CONF_OPTS += --with-archive
-else
-RPM_CONF_OPTS += --without-archive
-endif
-
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 RPM_DEPENDENCIES += libselinux
 RPM_CONF_OPTS += --with-selinux
@@ -101,6 +94,13 @@ else
 RPM_CONF_OPTS += --disable-zstd
 endif
 
+ifeq ($(BR2_PACKAGE_RPM_RPM2ARCHIVE),y)
+RPM_DEPENDENCIES += libarchive
+RPM_CONF_OPTS += --with-archive
+else
+RPM_CONF_OPTS += --without-archive
+endif
+
 # ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
 RPM_CONF_ENV = \
        ac_cv_prog_cc_c99='-std=gnu99' \