+ $(PKG_INFO_DIR)/$(1).version: $$(IPKG_$(1))
+ echo '$(ABI_VERSION)' | cmp -s - $$@ || \
+ echo '$(ABI_VERSION)' > $$@
+
+ Package/$(1)/DEPENDS := $$(call mergelist,$$(filter-out @%,$$(IDEPEND_$(1))))
+ ifneq ($$(EXTRA_DEPENDS),)
+ Package/$(1)/DEPENDS := $$(EXTRA_DEPENDS)$$(if $$(Package/$(1)/DEPENDS),$$(comma) $$(Package/$(1)/DEPENDS))
+ endif
+
+$(_define) Package/$(1)/CONTROL
+Package: $(1)
+Version: $(VERSION)
+$$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
+)$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
+)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES))
+)$$(call addfield,Source,$(SOURCE)
+)$$(call addfield,License,$$(PKG_LICENSE)
+)$$(call addfield,LicenseFiles,$$(PKG_LICENSE_FILES)
+)$$(call addfield,Section,$(SECTION)
+)$$(call addfield,Require-User,$(USERID)
+)$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed
+)$(if $(filter essential,$(PKG_FLAGS)),Essential: yes
+)$(if $(MAINTAINER),Maintainer: $(MAINTAINER)
+)Architecture: $(PKGARCH)
+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)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
+ @rm -rf $$(PDIR_$(1))/$(1)_* $$(IDIR_$(1))
+ mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)