2
|
1 |
#
|
|
2 |
# CDDL HEADER START
|
|
3 |
#
|
|
4 |
# The contents of this file are subject to the terms of the
|
|
5 |
# Common Development and Distribution License (the "License").
|
|
6 |
# You may not use this file except in compliance with the License.
|
|
7 |
#
|
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
9 |
# or http://www.opensolaris.org/os/licensing.
|
|
10 |
# See the License for the specific language governing permissions
|
|
11 |
# and limitations under the License.
|
|
12 |
#
|
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
15 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
18 |
#
|
|
19 |
# CDDL HEADER END
|
|
20 |
#
|
|
21 |
# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
|
|
22 |
#
|
|
23 |
|
|
24 |
#
|
|
25 |
# Rules and Macros for generating an IPS package manifest and publishing an
|
|
26 |
# IPS package to a pkg depot.
|
|
27 |
#
|
|
28 |
# To use these rules, include ../make-rules/ips.mk in your Makefile
|
|
29 |
# and define an "install" target appropriate to building your component.
|
|
30 |
# Ex:
|
|
31 |
#
|
|
32 |
# install: $(COMPONENT_SRC)/build-32/.installed \
|
|
33 |
# $(COMPONENT_SRC)/build-64/.installed
|
|
34 |
#
|
|
35 |
# This set of rules makes the "publish" target the default target for make(1)
|
|
36 |
#
|
|
37 |
|
|
38 |
PKGSEND = /usr/bin/pkgsend
|
|
39 |
PKGMOGRIFY = /usr/bin/pkgmogrify
|
|
40 |
PKGDEPEND = /usr/bin/pkgdepend
|
|
41 |
|
|
42 |
# Add some default transforms that should apply to everyone
|
|
43 |
PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/defaults
|
|
44 |
PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/actuators
|
|
45 |
|
|
46 |
.DEFAULT: publish
|
|
47 |
|
|
48 |
publish: $(COMPONENT_SRC)/.published
|
|
49 |
|
|
50 |
$(COMPONENT_SRC)/manifest: install
|
|
51 |
pkgsend generate $(PROTO_DIR) >$@
|
|
52 |
|
|
53 |
$(COMPONENT_SRC)/manifest.mog: $(COMPONENT_SRC)/manifest
|
|
54 |
echo "set name=pkg.fmri value=pkg:/$(PUBLISHER)/$(COMPONENT_NAME)@$(COMPONENT_VERSION),$(BUILD_VERSION)" >$@
|
|
55 |
echo "set name=pkg.description value=\"$(COMPONENT_DESCRIPTION)\"" >>$@
|
|
56 |
echo "set name=pkg.name value=\"$(COMPONENT_DESCRIPTION)\"" >>$@
|
|
57 |
echo "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)" >>$@
|
|
58 |
pkgmogrify $(PKGMOGRIFY_MACROS:%=-D %) $(PKGMOGRIFY_TRANSFORMS) $< >>$@
|
|
59 |
|
|
60 |
$(COMPONENT_SRC)/manifest.fdeps: $(COMPONENT_SRC)/manifest.mog
|
|
61 |
pkgdepend generate -m $< $(PROTO_DIR) >$@
|
|
62 |
|
|
63 |
$(COMPONENT_SRC)/manifest.fdeps.res: $(COMPONENT_SRC)/manifest.fdeps
|
|
64 |
pkgdepend resolve -m $<
|
|
65 |
|
|
66 |
$(COMPONENT_SRC)/.published: $(COMPONENT_SRC)/manifest.fdeps.res
|
|
67 |
pkgsend -s $(PKG_REPO) publish --fmri-in-manifest \
|
|
68 |
-d $(PROTO_DIR) $<
|
|
69 |
$(TOUCH) $@
|