ips.mk revision 2
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
3994N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
2N/A#
2N/A
2N/A#
2N/A# Rules and Macros for generating an IPS package manifest and publishing an
2N/A# IPS package to a pkg depot.
2N/A#
2N/A# To use these rules, include ../make-rules/ips.mk in your Makefile
2N/A# and define an "install" target appropriate to building your component.
2N/A# Ex:
166N/A#
166N/A# install: $(COMPONENT_SRC)/build-32/.installed \
2N/A# $(COMPONENT_SRC)/build-64/.installed
2N/A#
59N/A# This set of rules makes the "publish" target the default target for make(1)
59N/A#
166N/A
59N/APKGSEND = /usr/bin/pkgsend
59N/APKGMOGRIFY = /usr/bin/pkgmogrify
2N/APKGDEPEND = /usr/bin/pkgdepend
166N/A
166N/A# Add some default transforms that should apply to everyone
166N/APKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/defaults
2N/APKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/actuators
2N/A
2N/A.DEFAULT: publish
2N/A
2N/Apublish: $(COMPONENT_SRC)/.published
166N/A
2N/A$(COMPONENT_SRC)/manifest: install
2N/A pkgsend generate $(PROTO_DIR) >$@
2N/A
2N/A$(COMPONENT_SRC)/manifest.mog: $(COMPONENT_SRC)/manifest
166N/A echo "set name=pkg.fmri value=pkg:/$(PUBLISHER)/$(COMPONENT_NAME)@$(COMPONENT_VERSION),$(BUILD_VERSION)" >$@
2N/A echo "set name=pkg.description value=\"$(COMPONENT_DESCRIPTION)\"" >>$@
2N/A echo "set name=pkg.name value=\"$(COMPONENT_DESCRIPTION)\"" >>$@
58N/A echo "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)" >>$@
58N/A pkgmogrify $(PKGMOGRIFY_MACROS:%=-D %) $(PKGMOGRIFY_TRANSFORMS) $< >>$@
58N/A
58N/A$(COMPONENT_SRC)/manifest.fdeps: $(COMPONENT_SRC)/manifest.mog
58N/A pkgdepend generate -m $< $(PROTO_DIR) >$@
58N/A
151N/A$(COMPONENT_SRC)/manifest.fdeps.res: $(COMPONENT_SRC)/manifest.fdeps
151N/A pkgdepend resolve -m $<
58N/A
58N/A$(COMPONENT_SRC)/.published: $(COMPONENT_SRC)/manifest.fdeps.res
58N/A pkgsend -s $(PKG_REPO) publish --fmri-in-manifest \
58N/A -d $(PROTO_DIR) $<
119N/A $(TOUCH) $@
58N/A