mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
build: image: improve zip build recipe
* clean before build * specify executable path * allow adding extra options for zip * use basename of $@ Signed-off-by: Sungbo Eo <mans0n@gorani.run>
This commit is contained in:
parent
3b20eb185b
commit
446da70669
@ -524,12 +524,14 @@ define Build/xor-image
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/zip
|
define Build/zip
|
||||||
|
rm -rf $@.tmp
|
||||||
mkdir $@.tmp
|
mkdir $@.tmp
|
||||||
mv $@ $@.tmp/$(1)
|
mv $@ $@.tmp/$(word 1,$(1))
|
||||||
|
|
||||||
zip -j -X \
|
$(STAGING_DIR_HOST)/bin/zip -j -X \
|
||||||
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
|
||||||
$@ $@.tmp/$(if $(1),$(1),$@)
|
$(wordlist 2,$(words $(1)),$(1)) \
|
||||||
|
$@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@))
|
||||||
rm -rf $@.tmp
|
rm -rf $@.tmp
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user