python36: add libressl patch
[unleashed-userland.git] / tools / generate-history
blob13ec1f3bb41dab3cb96a6b4e63e0a42bf832dd69
1 # If invoked with -v FUNCTION=name, then just print $1 (s|/|---|).
2 # Otherwise we expect to be invoked with TARGET=<whatever>, then if
3 # s|/|---| on $1 matches TARGET, we generate a manifest.
5   if (substr($1, 1, 1) == "#") { # Skip comments.
6     next
7   }
8   fmri=$1
9   split(fmri, a, "@")
10   gsub("/", "---", a[1])
11   target = sprintf("%s.p5m", a[1])
12   if (FUNCTION == "name") {
13     printf "%s\n", target
14     next
15   }
16   if (target != TARGET) {
17     next
18   }
19   printf "set name=pkg.fmri value=pkg:/%s\n", fmri
20   
21   if (NF == 3 || (NF ==2  && $2 != "noincorporate")) {
22     print "set name=pkg.renamed value=true"
23     printf "depend type=require fmri=%s\n", $2
24   } else {
25     print "set name=pkg.obsolete value=true"
26   }
27   
28   if ($NF == "noincorporate") {
29     print "set name=pkg.tmp.noincorporate value=true"
30   }
31   print "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)"
32   exit 0 # We're done; no point continuing.