7036473 dependency resolution should happen in one step for all component's packages (fix historical packages build)
authorDanek Duvall <danek.duvall@oracle.com>
Tue, 19 Apr 2011 15:43:11 -0700
changeset 187 80d8cb349fea
parent 186 3adedf0f9f4d
child 188 64b262c9d53f
7036473 dependency resolution should happen in one step for all component's packages (fix historical packages build)
components/meta-packages/history/Makefile
--- a/components/meta-packages/history/Makefile	Thu Apr 07 16:25:05 2011 -0700
+++ b/components/meta-packages/history/Makefile	Tue Apr 19 15:43:11 2011 -0700
@@ -22,20 +22,41 @@
 #
 
 include ../../../make-rules/shared-macros.mk
-include $(WS_TOP)/make-rules/ips.mk
+
+# $(WS_TOP)/make-rules/ips.mk really isn't set up to allow you to bypass all
+# the automatic (and lengthy) manifest manipulation that it does, which we
+# really don't need to do for these static, uninteresting packages.  So we just
+# write a simple set of publication rules to get the packages into the repo.
 
-# we need a empty protodir or pkgsend will complain about it not existing
-PROTO_DIR=
+PKGSEND =	/usr/bin/pkgsend
+PKGLINT =	/usr/bin/pkglint
+PKGMOGRIFY =	/usr/bin/pkgmogrify
 
-# Don't really do anything for dependency generation
-PKGDEPEND=	/bin/true
+CANONICAL_MANIFESTS =	$(wildcard *.p5m)
+MANIFEST_BASE =		$(BUILD_DIR)/manifest-$(MACH)
+MOGRIFIED =		$(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
+PUBLISHED =		$(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
 
 $(BUILD_DIR):
 	$(MKDIR) [email protected]
 
-download prep test:
+$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
+	$(PKGMOGRIFY) -D CONSOLIDATION=$(CONSOLIDATION) $< > [email protected]
+
+$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
+	$(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest $<
+	$(TOUCH) [email protected]
 
-build install:	$(BUILD_DIR)
+$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(BUILD_DIR)
+	$(ENV) PYTHONPATH=$(WS_TOOLS)/python \
+		$(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
+			-f $(WS_TOOLS)/pkglintrc $(MOGRIFIED)
+	$(TOUCH) [email protected]
+
+$(BUILD_DIR)/.published-$(MACH): $(BUILD_DIR)/.linted-$(MACH) $(PUBLISHED)
+	$(TOUCH) [email protected]
+
+publish: $(BUILD_DIR)/.published-$(MACH)
 
 clobber clean:
 	$(RM) -r $(BUILD_DIR)