1339N/A# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 970N/A# Permission is hereby granted, free of charge, to any person obtaining a 970N/A# copy of this software and associated documentation files (the "Software"), 970N/A# to deal in the Software without restriction, including without limitation 970N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense, 970N/A# and/or sell copies of the Software, and to permit persons to whom the 970N/A# Software is furnished to do so, subject to the following conditions: 970N/A# The above copyright notice and this permission notice (including the next 970N/A# paragraph) shall be included in all copies or substantial portions of the 970N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 970N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 970N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 970N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 970N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 970N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 970N/A# DEALINGS IN THE SOFTWARE. 970N/A# Script to generate a package manifest for use with pkg(5) from a 970N/A# If <manifest input> exists, it is merged into the output. 970N/A# If <manifest input> does not exist, <license file> is included in the output 970N/A# The result is written to <manifest output>, or stdout if not specified 970N/A die (
"Must specify $opt $message\n");
970N/A die (
"Must specify only one value for $opt $message\n");
1265N/A if ($l =~ m{^\
#}) { # comment 1265N/A }
elsif ($l =~ m{^(.*)\\$}) {
# Line continues 970N/A# Check if there is an existing manifest to merge with 970N/A open my $
INPUT_MF,
'<', $
mf or die "Cannot open input_manifest $mf: $!\n";
1172N/A# Manifest listing entries not to include in manifest 1172N/A die "Cannot open exception_manifest $mf: $!\n";
1172N/A # Just adding it to action_seen, nothing more to do 970N/A# Generate a manifest header if not merging into an existing file 970N/A (
'manifest_license',
'when not merging with existing manifest.');
1339N/A # substitute the current year for @YEARS@ in the license template 970N/A open my $
LICENSE,
'<', $
lf or die "Cannot open manifest_license $lf: $!\n";
970N/A 'when not merging with existing manifest.');
970N/A 'value="XXX: Please provide a descriptive paragraph for the package."';
970N/A # First try looking in a README file for a short summary 970N/A # Then try looking in man pages 970N/A # Remove backslashes, such as \- instead of - 970N/A 'XXX: Please provide a short name for the package';
970N/A 'value="org.opensolaris.category.2008:',
970N/A 'with the name used for the subdirectory containing 64-bit objects');
970N/A 'for files to include in manifest');
970N/A # Skip -uninstalled.pc files, since those are only used during build 970N/A # Convert 64-bit subdirectories to platform-independent form 970N/A # Don't add duplicates of actions we've already got 970N/A # Drop file path from file actions, so we always use the path attribute 970N/A # Drop attributes that will be generated during package build