summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-29 14:19:42 +0100
committerRemi Collet <remi@remirepo.net>2018-11-29 14:19:42 +0100
commite87e6feaa6e012139280b2854abb4daebb463bc4 (patch)
tree2b8721e0a72db114021113c46ea17e0685aaeb2e
parent5a0bf066b475cb1a5eb5edf61595693a5a2dcd00 (diff)
v0.11.7 EOW
-rw-r--r--zephir.spec34
1 files changed, 20 insertions, 14 deletions
diff --git a/zephir.spec b/zephir.spec
index 10636f5..40f1f38 100644
--- a/zephir.spec
+++ b/zephir.spec
@@ -11,12 +11,7 @@
%global with_tests 0
%scl_package zephyr-parser
%else
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
%global with_tests 0%{!?_without_tests:1}
-%else
-# Disable in EL as 5.4 and 5.5 can't use phpunit
-%global with_tests 0%{?_with_tests:1}
-%endif
%endif
# Get commit from PHP_PHALCON_ZEPVERSION in
@@ -63,7 +58,7 @@ BuildRequires: (php-composer(symfony/finder) >= 3.4 with php-c
BuildRequires: (php-composer(symfony/framework-bundle) >= 3.4 with php-composer(symfony/framework-bundle) < 4)
BuildRequires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 4)
BuildRequires: (php-composer(symfony/monolog-bridge) >= 3.4 with php-composer(symfony/monolog-bridge) < 4)
-#BuildRequires: (php-composer(symfony/monolog-bundle) >= 3.4 with php-composer(symfony/monolog-bundle) < 4)
+BuildRequires: (php-composer(symfony/monolog-bundle) >= 3.3 with php-composer(symfony/monolog-bundle) < 4)
BuildRequires: (php-composer(symfony/routing) >= 3.4 with php-composer(symfony/routing) < 4)
BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 4)
%else
@@ -78,7 +73,7 @@ BuildRequires: php-symfony3-finder
BuildRequires: php-symfony3-framework-bundle
BuildRequires: php-symfony3-http-kernel
BuildRequires: php-symfony3-monolog-bridge
-#BuildRequires: php-symfony3-monolog-bundle
+BuildRequires: php-symfony-monolog-bundle
BuildRequires: php-symfony3-routing
BuildRequires: php-symfony3-yaml
%endif
@@ -105,6 +100,8 @@ BuildRequires: php-symfony3-phpunit-bridge
%endif
BuildRequires: %{_bindir}/phpunit
%endif
+# Autoloader
+BuildRequires: php-composer(fedora/autoloader)
Requires: %{?scl_prefix}php-cli
Requires: %{?scl_prefix}php-zephir-parser >= %{parser_ver}
@@ -151,7 +148,7 @@ Requires: (php-composer(symfony/finder) >= 3.4 with php-c
Requires: (php-composer(symfony/framework-bundle) >= 3.4 with php-composer(symfony/framework-bundle) < 4)
Requires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 4)
Requires: (php-composer(symfony/monolog-bridge) >= 3.4 with php-composer(symfony/monolog-bridge) < 4)
-#Requires: (php-composer(symfony/monolog-bundle) >= 3.4 with php-composer(symfony/monolog-bundle) < 4)
+Requires: (php-composer(symfony/monolog-bundle) >= 3.3 with php-composer(symfony/monolog-bundle) < 4)
Requires: (php-composer(symfony/routing) >= 3.4 with php-composer(symfony/routing) < 4)
Requires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 4)
%else
@@ -166,7 +163,7 @@ Requires: php-symfony3-finder
Requires: php-symfony3-framework-bundle
Requires: php-symfony3-http-kernel
Requires: php-symfony3-monolog-bridge
-#Requires: php-symfony3-monolog-bundle
+Requires: php-symfony-monolog-bundle
Requires: php-symfony3-routing
Requires: php-symfony3-yaml
%endif
@@ -175,6 +172,8 @@ Requires: %{?scl_prefix}php-reflection
Requires: %{?scl_prefix}php-date
Requires: %{?scl_prefix}php-gmp
Requires: %{?scl_prefix}php-pdo
+# Autoloader
+Requires: php-composer(fedora/autoloader)
Provides: %{?scl_prefix}php-composer(%{gh_owner}/%{gh_project}) = %{version}
@@ -231,9 +230,9 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
'%{_datadir}/php/Symfony3/Bundle/FrameworkBundle/autoload.php',
'%{_datadir}/php/Symfony3/Component/HttpKernel/autoload.php',
'%{_datadir}/php/Symfony3/Bridge/Monolog/autoload.php',
- // '%{_datadir}/php/Symfony3/Bundle/Monolog/autoload.php',
'%{_datadir}/php/Symfony3/Component/Routing/autoload.php',
'%{_datadir}/php/Symfony3/Component/Yaml/autoload.php',
+ '%{_datadir}/php/Symfony/Bundle/MonologBundle/autoload.php',
]);
EOF
@@ -266,10 +265,11 @@ install -Dpm 755 %{gh_project}.sh %{buildroot}%{_bindir}/%{gh_project}
%check
+%if %{with_tests}
sed -e 's:%{_datadir}:%{buildroot}%{_datadir}:' \
%{gh_project}.php > %{gh_project}.test
%{_bindir}/php %{gh_project}.test --version
-%{_bindir}/php %{gh_project}.test --version | grep %{version}-%{gh_short}
+%{_bindir}/php %{gh_project}.test --version | grep %{version}
%{_bindir}/php %{_bindir}/phpab -o bs.php unit-tests/fixtures/mocks
cat << 'EOF' | tee -a bs.php
@@ -281,10 +281,8 @@ require '%{buildroot}%{_datadir}/%{gh_project}/autoload.php';
]);
\Fedora\Autoloader\Autoload::addPsr4('Zephir\\Test\\', __DIR__ . '/unit-tests/Zephir/Test/');
\Fedora\Autoloader\Autoload::addPsr4('Extension\\', __DIR__ . '/unit-tests/Extension/');
-require __DIR__ . '/unit-tests/bootstrap.php';
EOF
-%if %{with_tests}
: Run test suite
%{_bindir}/php \
-d extension=zephir_parser.so \
@@ -293,13 +291,21 @@ EOF
--bootstrap bs.php \
--no-coverage \
--verbose unit-tests/Zephir
+
+case %{php_version} in
+ 5.6.*) VER=Php56;;
+ 7.0.*) VER=Php70;;
+ 7.1.*) VER=Php70;;
+ *) VER=Php72;;
+esac
+
%{_bindir}/php \
-d extension=zephir_parser.so \
-d extension=ext/modules/test.so \
%{_bindir}/phpunit \
--bootstrap bs.php \
--no-coverage \
- --verbose unit-tests/Extension
+ --verbose unit-tests/Extension/$VER
%else
: Test suite disabled
%endif