2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # T2 SDE: scripts/Create-PkgList
4 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 # This Copyright note is generated by scripts/Create-CopyPatch,
8 # more information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License version 2.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 if [ $# -ne 1 -o ! -d "architecture/$1" ]; then
15 echo "Usage: $0 [ <arch-name> ]"
16 [ $# -eq 0 ] ||
echo " '$1' is not a valid architecture"
24 function print_package() {
25 print defset, stages, pri, pkgtree,
26 package, ver, "/" categories flags, 0;
30 if ( pkgtree ) print_package();
33 ( FNR == 1 && pkgtree ) {
38 split(FILENAME, a, /\//);
39 pkgtree=a[1]; package=a[2];
40 defset="X"; pri="999.999";
42 ver="0000"; categories=""
46 /^\[(P|PRI|PRIORITY)\]/ {
47 split($0, a, /[ \t]+/);
48 defset=a[2]; stages=a[3]; pri=a[4];
51 /^\[(V|VER|VERSION)\]/ {
52 split($0, a, /[ \t]+/);
53 if ( ver_dup == 0 ) ver=a[2];
58 split($0, a, /[ \t]+/);
59 for (c=2; a[c]; c++) categories = categories " " a[c];
63 split($0, a, /[ \t]+/);
64 for (c=2; a[c]; c++) flags = flags " " a[c];
67 /^\[(R|ARCH|ARCHITECTURE)\]/ {
68 n=split($0, a, /[ \t]+/);
72 # search for an architecture match
74 for ( i = 3; i<= n; ++i) {
82 else { # intentionally start at index 2: implicit exlusive selection
83 for ( i = 2; i<= n; ++i) {
88 # not found: remove it
91 }' |
(cd package
; gawk
-f - */*/*.desc
) |
sort -k3