transforms/mkgeneric
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 26 Sep 2014 10:00:40 -0700
branchs11-update
changeset 3350 76050737d19e
parent 2576 f1b6ecbb2d1e
child 3378 8c7eb3630145
permissions -rw-r--r--
Close of build 7.3.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2576
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
# This set of transforms helps us take a package that's parameterized on a
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
# platform's versions and emit a package that conditionally depends on those
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
# versioned packages, predicated on the platform version packages being
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
# present.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
# For instance, for a package "mako-generic", we want to create a package
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
# "mako", which brings in "mako-26" if "python-26" is present, and "mako-27" if
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
# "python-27" is present.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
#
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
# We do this by grabbing just the set actions from "mako-generic", and emitting
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
# those conditional depend actions.  We require that the parameterized package
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
# name end in "-###" (typically by setting a pkgmogrify variable to "###"),
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
# which we also remove here.  This works in conjunction with a set of rules in
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
# make-rules/ips.mk which create and use another transform file that actually
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
# emit the conditional dependencies.
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
<transform file dir link hardlink license user group driver legacy signature -> drop>
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
<transform depend -> default nodrop false>
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
<transform depend nodrop=false -> drop>
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
<transform set name=pkg.fmri value=(?:pkg:/)?(.+)-###@(.*) -> \
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
	edit value -### "">
f1b6ecbb2d1e 16433531 Update Nose to 1.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
<transform depend nodrop=true -> delete nodrop true>