X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=include%2Fpackage-ipkg.mk;h=eb4c874047e8a9e24a4d77b13f7ba66e1221cbb5;hb=96843fb91c2b09accdf8b8bf12ad05db8c898951;hp=b8c8cd6f99cc9938fae2fdc72b37b6d3f0fd3d3d;hpb=5b3d1a03eab754652c8029407347451d60ca41a5;p=openwrt.git diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index b8c8cd6f99..eb4c874047 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -9,14 +9,19 @@ include $(INCLUDE_DIR)/feeds.mk # invoke ipkg-build with some default options IPKG_BUILD:= \ - $(STAGING_DIR_HOST)/bin/ipkg-build -c -o 0 -g 0 + $(SCRIPT_DIR)/ipkg-build -c -o 0 -g 0 IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg +# 1: package name +# 2: variable name +# 3: variable suffix +# 4: file is a script define BuildIPKGVariable ifdef Package/$(1)/$(2) $$(IPKG_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2)) - $(1)_COMMANDS += echo "$$$$$(2)$(3)" > $(2)$(3); + $(call shexport,Package/$(1)/$(2)) + $(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3); $(if $(4),chmod 0755 $(2)$(3);) endif endef @@ -62,7 +67,7 @@ ifneq ($(PKG_NAME),toolchain) XARGS="$(XARGS)"; \ $(SCRIPT_DIR)/gen-dependencies.sh "$$(IDIR_$(1))"; \ ) | while read FILE; do \ - grep -q "$$$$FILE" $(PKG_INFO_DIR)/$(1).provides || \ + grep -qxF "$$$$FILE" $(PKG_INFO_DIR)/$(1).provides || \ echo "$$$$FILE" >> $(PKG_INFO_DIR)/$(1).missing; \ done; \ if [ -f "$(PKG_INFO_DIR)/$(1).missing" ]; then \ @@ -109,7 +114,7 @@ ifeq ($(DUMP),) echo "$(1)" >> $(PKG_INSTALL_STAMP) endif else - $$(info WARNING: skipping $(1) -- package not selected) + $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected)) endif endif endif @@ -121,10 +126,10 @@ ifeq ($(DUMP),) $(FixupReverseDependencies) $(eval $(call BuildIPKGVariable,$(1),conffiles)) - $(eval $(call BuildIPKGVariable,$(1),preinst)) - $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg)) - $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg)) - $(eval $(call BuildIPKGVariable,$(1),postrm)) + $(eval $(call BuildIPKGVariable,$(1),preinst,,1)) + $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg,1)) + $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1)) + $(eval $(call BuildIPKGVariable,$(1),postrm,,1)) $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT) rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) @@ -199,7 +204,7 @@ $(_endef) echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_prerm \$$$$0 \$$$$@"; \ ) > prerm; \ - chmod 0755 prerm; \ + chmod 0755 postinst prerm; \ $($(1)_COMMANDS) \ )