From a85e6449e8d6be3c1a06e01c81e2353870310d6c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 2 Nov 2020 14:13:13 +0100 Subject: add composer module --- mkmodular | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) 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); } -- cgit