build: ensure that preinst and postrm are executable (fixes #19372)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45187
This commit is contained in:
parent
ad9f61d3bb
commit
640318e620
1 changed files with 6 additions and 5 deletions
|
@ -16,11 +16,12 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
|
||||||
# 1: package name
|
# 1: package name
|
||||||
# 2: variable name
|
# 2: variable name
|
||||||
# 3: variable suffix
|
# 3: variable suffix
|
||||||
|
# 4: file is a script
|
||||||
define BuildIPKGVariable
|
define BuildIPKGVariable
|
||||||
ifdef Package/$(1)/$(2)
|
ifdef Package/$(1)/$(2)
|
||||||
$$(IPKG_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2))
|
$$(IPKG_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2))
|
||||||
$(call shexport,Package/$(1)/$(2))
|
$(call shexport,Package/$(1)/$(2))
|
||||||
$(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3);
|
$(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3); $(if $(4),chmod 0755 $(2)$(3))
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -125,10 +126,10 @@ ifeq ($(DUMP),)
|
||||||
$(FixupReverseDependencies)
|
$(FixupReverseDependencies)
|
||||||
|
|
||||||
$(eval $(call BuildIPKGVariable,$(1),conffiles))
|
$(eval $(call BuildIPKGVariable,$(1),conffiles))
|
||||||
$(eval $(call BuildIPKGVariable,$(1),preinst))
|
$(eval $(call BuildIPKGVariable,$(1),preinst,,1))
|
||||||
$(eval $(call BuildIPKGVariable,$(1),postinst,-pkg))
|
$(eval $(call BuildIPKGVariable,$(1),postinst,-pkg,1))
|
||||||
$(eval $(call BuildIPKGVariable,$(1),prerm,-pkg))
|
$(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1))
|
||||||
$(eval $(call BuildIPKGVariable,$(1),postrm))
|
$(eval $(call BuildIPKGVariable,$(1),postrm,1))
|
||||||
|
|
||||||
$(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT)
|
$(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT)
|
||||||
rm -rf $(STAGING_DIR_ROOT)/tmp-$(1)
|
rm -rf $(STAGING_DIR_ROOT)/tmp-$(1)
|
||||||
|
|
Loading…
Reference in a new issue