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