generate-cleanup revision 5123
26N/A#
26N/A# CDDL HEADER START
26N/A#
26N/A# The contents of this file are subject to the terms of the
26N/A# Common Development and Distribution License (the "License").
26N/A# You may not use this file except in compliance with the License.
26N/A#
26N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26N/A# or http://www.opensolaris.org/os/licensing.
26N/A# See the License for the specific language governing permissions
26N/A# and limitations under the License.
26N/A#
26N/A# When distributing Covered Code, include this CDDL HEADER in each
26N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26N/A# If applicable, add the following below this CDDL HEADER, with the
26N/A# fields enclosed by brackets "[]" replaced with your own identifying
26N/A# information: Portions Copyright [yyyy] [name of copyright owner]
26N/A#
26N/A# CDDL HEADER END
26N/A#
26N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
26N/A#
26N/A
26N/A#
26N/A# This set of transforms is intended to be used to convert a set of actions
26N/A# generated by "pkgsend generate ..." into a more generic set of actions with
26N/A# most attributes removed and paths converted to use strategically placed
26N/A# macros to remove plartform or version specifics.
26N/A#
26N/A
26N/A# convert the "pkgsend generate" file "hash" to a common value
26N/A<transform file -> set action.hash 'NOHASH'>
26N/A
26N/A# drop extra attribute data that "pkgsend generate" might have added
26N/A<transform dir file link hardlink license -> delete timestamp .*>
26N/A<transform dir file link hardlink license -> delete pkg.size .*>
26N/A<transform dir file link hardlink license -> delete owner .*>
26N/A<transform dir file link hardlink license -> delete group .*>
26N/A<transform dir file link hardlink license -> delete mode .*>
26N/A
26N/A#<transform set name=pkg.fmri -> edit value "@[^ \t\n\r\f\v]*" "@$!(IPS_COMPONENT_VERSION),$!(BUILD_VERSION)">
26N/A
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparcv9|amd64)$" "/$!(MACH64)">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparcv9|amd64)/" "/$!(MACH64)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparcv7|i86)$" "/$!(MACH32)">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparcv7|i86)/" "/$!(MACH32)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparc|i386)$" "/$!(MACH)">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparc|i386)/" "/$!(MACH)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "/(sparc|i386)-(sun|pc)-solaris\d\.\d+" "/$!(MACH)-$!(PLAT)-solaris$!(SOLARIS_RELEASE)">
26N/A
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparcv9|amd64)$" "/$!(MACH64)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparcv9|amd64)/" "/$!(MACH64)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparcv7|i86)$" "/$!(MACH32)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparcv7|i86)/" "/$!(MACH32)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparc|i386)$" "/$!(MACH)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparc|i386)/" "/$!(MACH)/">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "/(sparc|i386)-(sun|pc)-solaris\d\.\d+" "/$!(MACH)-$!(PLAT)-solaris$!(SOLARIS_RELEASE)">
26N/A
26N/A# <transform dir file link hardlink -> \
26N/A# edit path "$(COMPONENT_NAME)" "$!(COMPONENT_NAME)">
26N/A# <transform dir file link hardlink -> \
26N/A# edit target "$(COMPONENT_NAME)" "$!(COMPONENT_NAME)">
26N/A
26N/A<transform dir file link hardlink -> \
5123N/A edit path "$(COMPONENT_VERSION)" "$!(COMPONENT_VERSION)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "$(COMPONENT_VERSION)" "$!(COMPONENT_VERSION)">
26N/A
26N/A<transform dir file link hardlink -> \
5123N/A edit path "$(IPS_VERSION)" "$!(IPS_VERSION)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "$(IPS_VERSION)" "$!(IPS_VERSION)">
26N/A
26N/A# convert temporary macro names to their real name
26N/A<transform set -> \
5123N/A edit value "\$!\((.*)\)" "$(\1)">
5123N/A<transform dir file link hardlink -> \
5123N/A edit path "\$!\((.*)\)" "$(\1)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "\$!\((.*)\)" "$(\1)">
5123N/A<transform dir file link hardlink -> \
5123N/A edit path "\$!\((.*)\)" "$(\1)">
5123N/A<transform dir file link hardlink -> \
5123N/A edit target "\$!\((.*)\)" "$(\1)">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "\$!\((.*)\)" "$(\1)">
5123N/A<transform dir file link hardlink -> \
5123N/A edit target "\$!\((.*)\)" "$(\1)">
26N/A<transform dir file link hardlink -> \
5123N/A edit path "\$!\((.*)\)" "$(\1)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "\$!\((.*)\)" "$(\1)">
5123N/A<transform dir file link hardlink -> \
5123N/A edit path "\$!\((.*)\)" "$(\1)">
26N/A<transform dir file link hardlink -> \
5123N/A edit target "\$!\((.*)\)" "$(\1)">
5123N/A
5123N/A# Omit "standard" directories and files we never want to ship (such as
5123N/A# libtool files).
5123N/A<transform dir path=etc$ -> drop>
5123N/A<transform dir path=etc/$\(MACH(32|64)\)$ -> drop>
5123N/A<transform dir path=usr$ -> drop>
5123N/A<transform dir path=usr/bin$ -> drop>
5123N/A<transform dir path=usr/bin/\$\(MACH(32|64)\)$ -> drop>
5123N/A<transform dir path=usr/include$ -> drop>
5123N/A<transform dir path=usr/lib$ -> drop>
5123N/A<transform dir path=usr/lib/pkgconfig$ -> drop>
5123N/A<transform dir path=usr/lib/\$\(MACH(32|64)\)$ -> drop>
5123N/A<transform dir path=usr/lib/\$\(MACH(32|64)\)/pkgconfig$ -> drop>
5123N/A<transform dir path=usr/share$ -> drop>
5123N/A<transform dir path=usr/share/aclocal$ -> drop>
5123N/A<transform dir path=usr/share/locale$ -> drop>
5123N/A<transform dir path=usr/share/locale/.*$ -> drop>
5123N/A<transform dir path=usr/share/man$ -> drop>
5123N/A<transform dir path=usr/share/man/.*$ -> drop>
5123N/A<transform dir path=usr/sbin$ -> drop>
5123N/A<transform dir path=usr/sbin/\$\(MACH(32|64)\)$ -> drop>
5123N/A<transform file path=.*\.la$ -> drop>