summaryrefslogtreecommitdiffstats
path: root/mkmodular
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-02 14:13:13 +0100
committerRemi Collet <remi@remirepo.net>2020-11-02 14:13:13 +0100
commita85e6449e8d6be3c1a06e01c81e2353870310d6c (patch)
treefb278d83368897d6086d81ccfff05f538a7f9213 /mkmodular
parent75ed83866228feee4476ac7bb7f85da1f8494eb1 (diff)
add composer module
Diffstat (limited to 'mkmodular')
-rwxr-xr-xmkmodular44
1 files changed, 44 insertions, 0 deletions
diff --git a/mkmodular b/mkmodular
index c01b92c5..fb37f768 100755
--- a/mkmodular
+++ b/mkmodular
@@ -196,6 +196,46 @@ data:
EOT;
+$template_comp = <<< EOT
+---
+document: modulemd
+version: 2
+data:
+ name: composer
+ stream: @VERSION@
+ version: @DATE@
+ context: 00000000
+ arch: @ARCH@
+ summary: Dependency Manager for PHP
+ description: >-
+ Composer @VERSION@ module
+ license:
+ module:
+ - MIT
+ content:
+ - MIT
+ dependencies:
+ - buildrequires:
+ platform: [@DIST@]
+ requires:
+@DEPS@
+ references:
+ documentation: https://getcomposer.org/
+ tracker: https://github.com/composer/composer/issues
+ profiles:
+ common:
+ rpms:
+ - composer
+ api:
+ rpms:
+ - composer
+ artifacts:
+ rpms:
+@RPMS@
+...
+
+EOT;
+
function findPackages($from, $dest, $pat) {
global $oldrpms;
@@ -425,6 +465,10 @@ if (count($_SERVER['argv']) < 2 || in_array('el8', $_SERVER['argv'])) {
$mod .= genModule('enterprise/8/glpi93/x86_64', $dest, '*.rpm', '9.3', 'x86_64', $deps, $template_glpi);
$mod .= genModule('enterprise/8/glpi94/x86_64', $dest, '*.rpm', '9.4', 'x86_64', $deps, $template_glpi);
$mod .= genDefaults('glpi', '9.4', ['9.3', '9.4']);
+ $deps = ['platform' => 'el8', 'php' => ''];
+ $mod .= genModule('enterprise/8/composer1/x86_64', $dest, '*.rpm', '1', 'x86_64', $deps, $template_comp);
+ $mod .= genModule('enterprise/8/composer2/x86_64', $dest, '*.rpm', '2', 'x86_64', $deps, $template_comp);
+ $mod .= genDefaults('composer', '2', ['1', '2']);
createRepo($dest, $mod);
}