summaryrefslogtreecommitdiffstats
path: root/php-composer-ca-bundle.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-30 07:22:58 +0100
committerRemi Collet <remi@remirepo.net>2017-11-30 07:22:58 +0100
commit84827b1ee80b94702e0bb1936d6f52fa481ba6cd (patch)
tree418820380d5b72f05b0d43db9fc78513cac936da /php-composer-ca-bundle.spec
parentb3708a4a1a01e406e8691f64adb7e05205a100ba (diff)
Update to 1.1.0
allow Symfony 2, 3 and 4
Diffstat (limited to 'php-composer-ca-bundle.spec')
-rw-r--r--php-composer-ca-bundle.spec36
1 files changed, 26 insertions, 10 deletions
diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec
index decdea1..c8727b2 100644
--- a/php-composer-ca-bundle.spec
+++ b/php-composer-ca-bundle.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 36344aeffdc37711335563e6108cda86566432a6
+%global gh_commit 943b2c4fcad1ef178d16a713c2468bf7e579c288
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner composer
%global gh_project ca-bundle
@@ -14,7 +14,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-composer-ca-bundle
-Version: 1.0.9
+Version: 1.1.0
Release: 1%{?dist}
Summary: Lets you find a path to the system CA
@@ -24,7 +24,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to get everything, despite .gitattributes
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-Source2: %{name}-autoload.php
# Never bundle a CA file
Patch0: %{name}-rpm.patch
@@ -36,13 +35,13 @@ BuildRequires: php-openssl
BuildRequires: php-pcre
BuildRequires: php-cli
# From composer.json, "require": {
-# "phpunit/phpunit": "^4.5",
+# "phpunit/phpunit": "^4.8.35",
# "psr/log": "^1.0",
-# "symfony/process": "^2.5 || ^3.0"
+# "symfony/process": "^2.5 || ^3.0 || ^4.0"
BuildRequires: phpunit
BuildRequires: php-composer(psr/log) < 2
BuildRequires: php-composer(psr/log) >= 1.0
-BuildRequires: php-composer(symfony/process) < 3
+BuildRequires: php-composer(symfony/process) < 5
BuildRequires: php-composer(symfony/process) >= 2.5
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -76,11 +75,18 @@ Autoloader: %{php_home}/Composer/CaBundle/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-cp %{SOURCE2} src/autoload.php
%patch0 -p0 -b .rpm
-
find src -name \*.rpm -exec rm {} \;
+cat << 'EOF' | tee src/autoload.php
+<?php
+/* Autoloader for %{gh_owner}/%{gh_project} and its dependencies */
+
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Composer\\CaBundle\\', __DIR__);
+EOF
+
%build
# Empty build section, most likely nothing required.
@@ -98,8 +104,14 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/Composer/CaBundle/autoload.php';
-require_once '%{php_home}/Psr/Log/autoload.php';
-require_once '%{php_home}/Symfony/Component/Process/autoload.php';
+\Fedora\Autoloader\Dependencies::required(array(
+ array(
+ '%{php_home}/Symfony4/Component/Process/autoload.php',
+ '%{php_home}/Symfony3/Component/Process/autoload.php',
+ '%{php_home}/Symfony/Component/Process/autoload.php',
+ ),
+ '%{php_home}/Psr/Log/autoload.php',
+));
EOF
ret=0
@@ -124,6 +136,10 @@ exit $ret
%changelog
+* Thu Nov 30 2017 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- Update to 1.1.0
+- allow Symfony 2, 3 and 4
+
* Tue Nov 14 2017 Remi Collet <remi@remirepo.net> - 1.0.9-1
- Update to 1.0.9 (no change)