summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json4
-rw-r--r--php-nette-finder.spec47
2 files changed, 21 insertions, 30 deletions
diff --git a/composer.json b/composer.json
index 77d713e..344dc8d 100644
--- a/composer.json
+++ b/composer.json
@@ -15,10 +15,10 @@
],
"require": {
"php": ">=5.6.0",
- "nette/utils": "~2.4"
+ "nette/utils": "^2.4 || ~3.0.0"
},
"require-dev": {
- "nette/tester": "~2.0",
+ "nette/tester": "^2.0",
"tracy/tracy": "^2.3"
},
"conflict": {
diff --git a/php-nette-finder.spec b/php-nette-finder.spec
index adad9cb..eb18dfd 100644
--- a/php-nette-finder.spec
+++ b/php-nette-finder.spec
@@ -6,21 +6,22 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 5cabd5fe89f9903715359a403b820c7f94f9bb5e
+%global gh_commit 4d43a66d072c57d585bf08a3ef68d3587f7e9547
#global gh_date 20150728
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nette
%global gh_project finder
%global ns_vendor Nette
-# Shoudl be Utils... be seems ugly, expecially for autoloader
+# classes are under Utils namespace
+# keep autoload.php in Finder directory for compatibility
%global ns_project Finder
%global php_home %{_datadir}/php
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.4.0
+Version: 2.4.1
%global specrel 1
-Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
+Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Nette Finder: Files Searching
Group: Development/Libraries
@@ -30,7 +31,6 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
# pull a git snapshot to get test sutie
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-composer(theseer/autoload)
%if %{with_tests}
@@ -39,7 +39,7 @@ BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-composer(%{gh_owner}/utils) >= 2.4
# From composer.json, "require-dev": {
-# "nette/tester": "~2.0",
+# "nette/tester": "^2.0",
# "tracy/tracy": "^2.3"
# ignore tracy (pass without)
BuildRequires: php-composer(%{gh_owner}/tester) >= 2.0
@@ -47,10 +47,10 @@ BuildRequires: php-composer(%{gh_owner}/tester) >= 2.0
# from composer.json, "require": {
# "php": ">=5.6.0",
-# "nette/utils": "~2.4"
+# "nette/utils": "^2.4 || ~3.0.0"
Requires: php(language) >= 5.6
Requires: php-composer(%{gh_owner}/utils) >= 2.4
-Requires: php-composer(%{gh_owner}/utils) < 3
+Requires: php-composer(%{gh_owner}/utils) < 4
# from phpcompatinfo report for version 2.3.1
Requires: php-pcre
Requires: php-spl
@@ -71,6 +71,7 @@ To use this library, you just have to add, in your project:
%build
: Generate a classmap autoloader
+mkdir src/%{ns_project}
phpab --output src/%{ns_project}/autoload.php src
cat << 'EOF' | tee -a src/%{ns_project}/autoload.php
@@ -80,7 +81,6 @@ EOF
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
cp -pr src/* %{buildroot}%{php_home}/%{ns_vendor}/
@@ -98,41 +98,32 @@ require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
EOF
: Run test suite in sources tree
-# remirepo:11
ret=0
-run=0
-if which php56; then
- php56 %{_bindir}/nette-tester --colors 0 -p php56 -C tests -s || ret=1
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/nette-tester --colors 0 -p php71 -C tests -s || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/nette-tester --colors 0 -p php -C tests -s
-# remirepo:2
-fi
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/nette-tester --colors 0 -p $cmd -C tests -d serialize_precision=14 -s || ret=1
+ fi
+done
exit $ret
%else
: Test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license license.md
%doc readme.md contributing.md
%doc composer.json
%{php_home}/%{ns_vendor}/%{ns_project}
+%{php_home}/%{ns_vendor}/Utils/*
%changelog
+* Sun Aug 6 2017 Remi Collet <remi@remirepo.net> - 2.4.1-1
+- Update to 2.4.1
+- move from Finder to Utils directory
+
* Tue Aug 2 2016 Remi Collet <remi@fedoraproject.org> - 2.4.0-1
- update to 2.4.0
- raise dependency on PHP >= 5.6