zstd: build program and add menuconfig entry for host variant
The zstd (de)compression tool may be used in post-image scripts to compress certain elements of the final image. In order to allow that, make host-zstd selectable in the 'Host utilities' menu, and build the binary in addition to the library. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
63d76c6f2f
commit
c76380dd7c
|
@ -62,5 +62,6 @@ menu "Host utilities"
|
|||
source "package/vboot-utils/Config.in.host"
|
||||
source "package/xorriso/Config.in.host"
|
||||
source "package/zip/Config.in.host"
|
||||
source "package/zstd/Config.in.host"
|
||||
|
||||
endmenu
|
||||
|
|
8
package/zstd/Config.in.host
Normal file
8
package/zstd/Config.in.host
Normal file
|
@ -0,0 +1,8 @@
|
|||
config BR2_PACKAGE_HOST_ZSTD
|
||||
bool "host zstd"
|
||||
help
|
||||
Zstandard, or zstd as short version, is a fast lossless
|
||||
compression algorithm, targeting real-time compression
|
||||
scenarios at zlib-level and better compression ratios
|
||||
|
||||
https://facebook.github.io/zstd
|
|
@ -72,11 +72,15 @@ endef
|
|||
define HOST_ZSTD_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/lib
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D) zstd
|
||||
endef
|
||||
|
||||
define HOST_ZSTD_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
||||
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
||||
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
|
Loading…
Reference in a new issue