summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.spec14
1 files changed, 9 insertions, 5 deletions
diff --git a/composer.spec b/composer.spec
index 9e247a1..22da6b4 100644
--- a/composer.spec
+++ b/composer.spec
@@ -161,6 +161,7 @@ Requires: php-composer(fedora/autoloader)
# System certificates
Requires: ca-certificates
# Bundled libraries
+# License MIT
Provides: bundled(php-composer-ca-bundle) = 1.3.1
Provides: bundled(php-composer-metadata-minifier) = 1.0.0
Provides: bundled(php-composer-pcre) = 2.0.0
@@ -300,13 +301,16 @@ php -r '
echo "cant decode json file\n";
exit(3);
}
- $lic = [];
+ $res = [];
foreach($pkgs["packages"] as $pkg) {
- printf("Provides: bundled(php-%s) = %s\n", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]);
- $lic = array_merge($lic, $pkg["license"]);
+ $lic = implode(" and ", $pkg["license"]);
+ if (!isset($res[$lic])) $res[$lic] = [];
+ $res[$lic][] = sprintf("Provides: bundled(php-%s) = %s", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]);
+ }
+ foreach($res as $lic => $lib) {
+ sort($lib);
+ printf("# License %s\n%s\n", $lic, implode("\n", $lib));
}
- sort($lic);
- printf("\nLicense: %s\n\n", implode(" and ", array_unique($lic)));
'
%endif