author | Norm Jacobs <Norm.Jacobs@Sun.COM> |
Wed, 12 May 2010 01:53:05 -0500 | |
changeset 7 | d42300cb8715 |
parent 4 | 3d5acfe9dab4 |
child 12 | 41aeb1fd8c2d |
permissions | -rw-r--r-- |
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 |
|
4 | 45 |
PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/devel |
46 |
PKGMOGRIFY_TRANSFORMS += $(WS_TOP)/transforms/docs |
|
2 | 47 |
|
48 |
.DEFAULT: publish |
|
49 |
||
50 |
publish: $(COMPONENT_SRC)/.published |
|
51 |
||
7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
52 |
COPYRIGHT_FILE = $(COMPONENT_NAME)-$(COMPONENT_VERSION).copyright |
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
53 |
|
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
54 |
$(PROTO_DIR)/$(COPYRIGHT_FILE): $(COMPONENT_COPYRIGHT) |
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
55 |
$(CP) $< $@ |
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
56 |
|
2 | 57 |
$(COMPONENT_SRC)/manifest: install |
58 |
pkgsend generate $(PROTO_DIR) >$@ |
|
59 |
||
7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
60 |
$(COMPONENT_SRC)/manifest.mog: $(COMPONENT_SRC)/manifest $(PROTO_DIR)/$(COPYRIGHT_FILE) |
2 | 61 |
echo "set name=pkg.fmri value=pkg:/$(PUBLISHER)/$(COMPONENT_NAME)@$(COMPONENT_VERSION),$(BUILD_VERSION)" >$@ |
62 |
echo "set name=pkg.description value=\"$(COMPONENT_DESCRIPTION)\"" >>$@ |
|
63 |
echo "set name=pkg.name value=\"$(COMPONENT_DESCRIPTION)\"" >>$@ |
|
64 |
echo "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)" >>$@ |
|
7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
4
diff
changeset
|
65 |
echo "license $(COPYRIGHT_FILE) license=$(COPYRIGHT_FILE)" >>$@ |
2 | 66 |
pkgmogrify $(PKGMOGRIFY_MACROS:%=-D %) $(PKGMOGRIFY_TRANSFORMS) $< >>$@ |
67 |
||
68 |
$(COMPONENT_SRC)/manifest.fdeps: $(COMPONENT_SRC)/manifest.mog |
|
69 |
pkgdepend generate -m $< $(PROTO_DIR) >$@ |
|
70 |
||
71 |
$(COMPONENT_SRC)/manifest.fdeps.res: $(COMPONENT_SRC)/manifest.fdeps |
|
72 |
pkgdepend resolve -m $< |
|
73 |
||
74 |
$(COMPONENT_SRC)/.published: $(COMPONENT_SRC)/manifest.fdeps.res |
|
75 |
pkgsend -s $(PKG_REPO) publish --fmri-in-manifest \ |
|
76 |
-d $(PROTO_DIR) $< |
|
77 |
$(TOUCH) $@ |