summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zendservice-recaptcha.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-02-20 14:50:38 +0100
committerRemi Collet <fedora@famillecollet.com>2017-02-20 14:50:38 +0100
commitc27d5015f786538b6f3c31f1838ac09aae8736fb (patch)
tree9462ea4591703c62fa0aedc040ae4569c9664bbf /php-zendframework-zendservice-recaptcha.spec
parent3baecdb3ec366c600923905fabfc4693a809d6c9 (diff)
php-zendframework-zendservice-recaptcha: 3.0.0
Diffstat (limited to 'php-zendframework-zendservice-recaptcha.spec')
-rw-r--r--php-zendframework-zendservice-recaptcha.spec86
1 files changed, 53 insertions, 33 deletions
diff --git a/php-zendframework-zendservice-recaptcha.spec b/php-zendframework-zendservice-recaptcha.spec
index a9858b9..379b0df 100644
--- a/php-zendframework-zendservice-recaptcha.spec
+++ b/php-zendframework-zendservice-recaptcha.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 4324cca8502d9f47b3b43a18acdd3fdbeb965536
+%global gh_commit 6c6877c07c8ac73b187911ea5d264a640b234361
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project ZendService_ReCaptcha
@@ -16,11 +16,8 @@
%global library ReCaptcha
%global with_tests 0%{!?_without_tests:1}
-############# TODO seems dead / unmaintained - last commit in 2012 #########
-
-
Name: php-%{gh_owner}-%{pk_project}
-Version: 2.0.1
+Version: 3.0.0
Release: 1%{?dist}
Summary: Zend Framework %{library} component
@@ -35,27 +32,38 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.3.3
-BuildRequires: php-mcrypt
-BuildRequires: php-composer(phpunit/phpunit)
-BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.0.0
-BuildRequires: php-composer(%{gh_owner}/zend-uri) >= 2.0.0
-BuildRequires: php-composer(%{gh_owner}/zend-version) >= 2.0.0
+BuildRequires: php(language) >= 5.6
+BuildRequires: php-json
+BuildRequires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
+BuildRequires: php-composer(%{gh_owner}/zend-json) >= 2.6.1
+# From composer.json, "require-dev": {
+# "phpunit/phpunit": "^5.7 || ^6.0",
+# "zendframework/zend-coding-standard": "~1.0.0",
+# "zendframework/zend-config": "^2.0",
+# "zendframework/zend-validator": "^2.8.2"
+BuildRequires: php-composer(phpunit/phpunit) >= 5.7
+BuildRequires: php-composer(%{gh_owner}/zend-config) >= 2.0
+BuildRequires: php-composer(%{gh_owner}/zend-validator) >= 2.8.2
# Autoloader
BuildRequires: php-composer(%{gh_owner}/zend-loader)
%endif
# From composer, "require": {
-# "php": ">=5.3.3",
-# "zendframework/zend-http": ">=2.0.0",
-# "zendframework/zend-uri": ">=2.0.0",
-# "zendframework/zend-version": ">=2.0.0"
-Requires: php(language) >= 5.3.3
-Requires: php-composer(%{gh_owner}/zend-http) >= 2.0.0
-Requires: php-composer(%{gh_owner}/zend-uri) >= 2.0.0
-Requires: php-composer(%{gh_owner}/zend-version) >= 2.0.0
-# From phpcompatinfo report for version 2.0.1
-Requires: php-mcrypt
+# "php": "^5.6 || ^7.0",
+# "zendframework/zend-http": "^2.5.4",
+# "zendframework/zend-json": "^2.6.1 || ^3.0"
+Requires: php(language) >= 5.6
+Requires: php-composer(%{gh_owner}/zend-http) >= 2.5.4
+Requires: php-composer(%{gh_owner}/zend-http) < 3
+Requires: php-composer(%{gh_owner}/zend-json) >= 2.6.1
+Requires: php-composer(%{gh_owner}/zend-json) < 4
+# From compsoer, "suggest": {
+# "zendframework/zend-validator": "~2.0, if using ReCaptcha's Mailhide API"
+%if 0%{?fedora} >= 21
+Suggests: php-composer(%{gh_owner}/zend-validator)
+%endif
+# From phpcompatinfo report for version 3.0.0 (mcrypt is optional)
+Requires: php-json
Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version}
@@ -67,7 +75,7 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version}
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-mv LICENSE.txt LICENSE
+mv LICENSE.md LICENSE
%build
@@ -77,8 +85,8 @@ mv LICENSE.txt LICENSE
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}%{php_home}
-cp -pr library/%{namespace} %{buildroot}%{php_home}/%{namespace}
+mkdir -p %{buildroot}%{php_home}/%{namespace}
+cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}
install -pm 644 %{SOURCE2} %{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php
@@ -88,16 +96,24 @@ install -pm 644 %{SOURCE2} %{buildroot}%{php_home}/%{namespace}/%{library}/auto
mkdir vendor
cat << EOF | tee vendor/autoload.php
<?php
-require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
-Zend\\Loader\\AutoloaderFactory::factory(array(
- 'Zend\\Loader\\StandardAutoloader' => array(
- 'namespaces' => array(
- 'ZendServiceTest\\\\%{library}' => dirname(__DIR__).'/tests/ZendServiceTest/ReCaptcha'
-))));
require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
EOF
-cd tests
-%{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if which php71; then
+ php70 %{_bindir}/phpunit6 || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
+%{_bindir}/phpunit --verbose
+# remirepo:2
+fi
+exit $ret
%else
: Test suite disabled
%endif
@@ -113,9 +129,13 @@ rm -rf %{buildroot}
%license LICENSE
%doc *.md
%doc composer.json
-%{php_home}/%{library}
+%dir %{php_home}/%{namespace}
+ %{php_home}/%{namespace}/%{library}
%changelog
+* Mon Feb 20 2017 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
+- update to 3.0.0
+
* Thu Aug 6 2015 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
- initial package