From 6c301f3562f66f0aa2ef61c3a2a38719f1dfce1e Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 7 Aug 2023 15:06:21 +0000 Subject: automatic import of composer --- composer-add-aliyun-repository.patch | 14 -------------- composer-add-huaweicloud-repository.patch | 14 ++++++++++++++ composer.spec | 31 +++++-------------------------- 3 files changed, 19 insertions(+), 40 deletions(-) delete mode 100644 composer-add-aliyun-repository.patch create mode 100644 composer-add-huaweicloud-repository.patch diff --git a/composer-add-aliyun-repository.patch b/composer-add-aliyun-repository.patch deleted file mode 100644 index f5bc1c2..0000000 --- a/composer-add-aliyun-repository.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/Composer/Config.php.orig 2023-02-25 11:59:19.951057271 +0800 -+++ b/src/Composer/Config.php 2023-02-25 12:03:48.490871158 +0800 -@@ -86,6 +86,11 @@ - - /** @var array */ - public static $defaultRepositories = [ -+ 'aliyun.com' => [ -+ 'type' => 'composer', -+ 'url' => 'https://mirrors.aliyun.com/composer/', -+ 'canonical' => false, -+ ], - 'packagist.org' => [ - 'type' => 'composer', - 'url' => 'https://repo.packagist.org', diff --git a/composer-add-huaweicloud-repository.patch b/composer-add-huaweicloud-repository.patch new file mode 100644 index 0000000..2754820 --- /dev/null +++ b/composer-add-huaweicloud-repository.patch @@ -0,0 +1,14 @@ +--- a/src/Composer/Config.php.orig 2023-02-25 11:59:19.951057271 +0800 ++++ b/src/Composer/Config.php 2023-02-25 12:03:48.490871158 +0800 +@@ -86,6 +86,11 @@ + + /** @var array */ + public static $defaultRepositories = [ ++ 'huaweicloud.com' => [ ++ 'type' => 'composer', ++ 'url' => 'https://repo.huaweicloud.com/repository/php/', ++ 'canonical' => false, ++ ], + 'packagist.org' => [ + 'type' => 'composer', + 'url' => 'https://repo.packagist.org', diff --git a/composer.spec b/composer.spec index 999aed7..3992dbe 100644 --- a/composer.spec +++ b/composer.spec @@ -1,4 +1,3 @@ -%define anolis_release 1 %undefine __brp_mangle_shebangs %global gh_commit 4c516146167d1392c8b9b269bb7c24115d262164 @@ -18,7 +17,7 @@ Name: composer Version: %{upstream_version} -Release: %{anolis_release}%{?dist} +Release: 1 Summary: Dependency Manager for PHP # SPDX: composer and all dependencies are MIT @@ -36,8 +35,8 @@ Source5: makesrc.sh Patch0: %{name}-rpm.patch # Disable XDG support as only partially implemented Patch1: %{name}-noxdg.patch -# Use Aliyun mirror by default -Patch10: composer-add-aliyun-repository.patch +# Use Huaweicloud mirror by default +Patch10: composer-add-huaweicloud-repository.patch BuildArch: noarch # platform set in makesrc.sh @@ -120,15 +119,6 @@ ensuring you have the right stack everywhere. Documentation: https://getcomposer.org/doc/ -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{EVR} -BuildArch: noarch - -%description doc -The %{name}-doc package contains documentation files for %{name}. - - %prep %autosetup -p1 -n %{gh_project}-%{gh_commit} @@ -209,25 +199,14 @@ install -Dpm 755 bin/%{name} %{buildroot}%{_bindir}/%{name} %files %license LICENSE +%doc *.md doc +%doc composer.json %config(noreplace) %{_sysconfdir}/profile.d/%{name}.* %{_bindir}/%{name} %{_datadir}/php/Composer %{_datadir}/%{name} %{bashcomproot} -%files doc -%doc *.md doc -%doc composer.json - %changelog * Mon Jul 10 2023 Funda Wang - 2.5.8-1 -- New version 2.5.8 - -* Thu Mar 30 2023 Funda Wang - 2.5.5-1 -- New version 2.5.5 - -* Mon Mar 27 2023 happy_orange - 2.5.4-2 -- add doc package - -* Sat Feb 18 2023 Funda Wang - 2.5.4-1 - Import package from Remi -- cgit v1.2.3