X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fpackage-ipkg.mk;h=9e2717e788cc21457df15162a0926aa6ad7db6ec;hp=3e2e31c789e13be0c63a55726c931fd2321273a6;hb=671999157d6cd0b629304f86beec7d71fc998b09;hpb=f784b3e195cf5932347f0c2297b8604da93d12e3 diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 3e2e31c789..9e2717e788 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -107,22 +107,18 @@ ifeq ($(DUMP),) ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) IPKGS += $(1) $(_pkg_target)compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed + prepare-package-install: $$(IPKG_$(1)) compile: $(STAGING_DIR_ROOT)/stamp/.$(1)_installed else $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected)) endif .PHONY: $(PKG_INSTALL_STAMP).$(1) - compile: $(PKG_INSTALL_STAMP).$(1) - $(PKG_INSTALL_STAMP).$(1): - if [ -f $(PKG_INSTALL_STAMP).clean ]; then \ - rm -f \ - $(PKG_INSTALL_STAMP) \ - $(PKG_INSTALL_STAMP).clean; \ - fi ifeq ($(CONFIG_PACKAGE_$(1)),y) - echo "$(1)" >> $(PKG_INSTALL_STAMP) + compile: $(PKG_INSTALL_STAMP).$(1) endif + $(PKG_INSTALL_STAMP).$(1): prepare-package-install + echo "$(1)" >> $(PKG_INSTALL_STAMP) endif endif @@ -163,9 +159,10 @@ Version: $(VERSION) $$(call addfield,Depends,$$(Package/$(1)/DEPENDS) )$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS)) )$$(call addfield,Provides,$$(call mergelist,$(PROVIDES)) +)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES)) )$$(call addfield,Source,$(SOURCE) -)$$(call addfield,License,$$(PKG_LICENSE) -)$$(call addfield,LicenseFiles,$$(PKG_LICENSE_FILES) +)$$(call addfield,License,$(LICENSE) +)$$(call addfield,LicenseFiles,$(LICENSE_FILES) )$$(call addfield,Section,$(SECTION) )$$(call addfield,Require-User,$(USERID) )$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed @@ -175,11 +172,10 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS) Installed-Size: 0 $(_endef) - $(PKG_INFO_DIR)/$(1).provides: $$(IPKG_$(1)) $$(IPKG_$(1)) : export CONTROL=$$(Package/$(1)/CONTROL) $$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description) $$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG) - $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk + $(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk @rm -rf $$(IDIR_$(1)) $$(call opkg_package_files,$(1)) mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR) $(call Package/$(1)/install,$$(IDIR_$(1))) @@ -207,11 +203,13 @@ $(_endef) ( \ echo "#!/bin/sh"; \ echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_postinst \$$$$0 \$$$$@"; \ ) > postinst; \ ( \ echo "#!/bin/sh"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_prerm \$$$$0 \$$$$@"; \ ) > prerm; \