summaryrefslogtreecommitdiffstats
path: root/php-fedora-autoloader.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-29 06:10:18 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-29 06:10:18 +0200
commitd4f947170334a74bbf880085a312f2fbc78c0bc2 (patch)
treeccf26115a4335339e5ccd23457f5d71bd63f2353 /php-fedora-autoloader.spec
parent49240e4615a3ed27bff2fc434efd4334959093ab (diff)
php-fedora-autoloader: 0.2.1
Diffstat (limited to 'php-fedora-autoloader.spec')
-rw-r--r--php-fedora-autoloader.spec53
1 files changed, 30 insertions, 23 deletions
diff --git a/php-fedora-autoloader.spec b/php-fedora-autoloader.spec
index 894ce67..2d60ae1 100644
--- a/php-fedora-autoloader.spec
+++ b/php-fedora-autoloader.spec
@@ -13,8 +13,8 @@
%global github_owner php-fedora
%global github_name autoloader
-%global github_version 0.2.0
-%global github_commit acadcf9f2511ac7b777117eb66728f95faabbe99
+%global github_version 0.2.1
+%global github_commit 98d5a2ec9389686eec8e185c1d0495ef1a6a75c3
%global composer_vendor fedora
%global composer_project autoloader
@@ -45,18 +45,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
+BuildRequires: php-cli
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(theseer/autoload) >= %{phpab_min_ver}
BuildRequires: php-pear
-## phpcompatinfo (computed from version 0.2.0)
+## phpcompatinfo (computed from version 0.2.1)
BuildRequires: php-spl
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 0.2.0)
+# phpcompatinfo (computed from version 0.2.1)
Requires: php-spl
# Composer
@@ -92,7 +93,7 @@ Provides needed tools to build other packages:
%prep
%setup -qn %{github_name}-%{github_commit}
-: Set PHP directory in phpab template
+: Set autoload path in phpab template
sed "s#___AUTOLOAD_PATH___#'%{phpdir}/Fedora/Autoloader'#" \
-i res/phpab/fedora.php.tpl
@@ -104,9 +105,8 @@ sed "s#___AUTOLOAD_PATH___#'%{phpdir}/Fedora/Autoloader'#" \
%install
rm -rf %{buildroot}
: Main
-mkdir -p %{buildroot}%{phpdir}/Fedora/Autoloader/Test
+mkdir -p %{buildroot}%{phpdir}/Fedora/Autoloader
cp -rp src/* %{buildroot}%{phpdir}/Fedora/Autoloader/
-cp -rp tests/* %{buildroot}%{phpdir}/Fedora/Autoloader/Test/
: Devel
mkdir -p %{buildroot}%{phpab_template_dir}
@@ -115,33 +115,27 @@ cp -p res/phpab/fedora.php.tpl %{buildroot}%{phpab_template_dir}/
%check
%if %{with_tests}
-if grep Fedora/Autoloader %{_datadir}/php/PHPUnit/Autoload.php; then
- # drop to avoid duplicated class (used for boostrap)
- :> src/autoload.php
-else
- # workaround when not in global autoloader
- sed -e '/define(/d' -i src/autoload.php
-fi
-
# remirepo:15
run=0
ret=0
if which php56; then
: Run upstream test suite with PHP 5
php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php:%{_datadir}/pear \
- %{_bindir}/phpunit || ret=1
+ %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php || ret=1
run=1
fi
if which php71; then
: Run upstream test suite with PHP 7
php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php:%{_datadir}/pear \
- %{_bindir}/phpunit || ret=1
+ %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php || ret=1
run=1
fi
if [ $run -eq 0 ]; then
-: Run upstream test suite
-%{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php:%{_datadir}/pear \
- %{_bindir}/phpunit --verbose
+%{_bindir}/php \
+ -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
+ %{_bindir}/phpunit \
+ --bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php \
+ --verbose
# remirepo:2
fi
exit $ret
@@ -160,7 +154,6 @@ rm -rf %{buildroot}
%license LICENSE
%dir %{phpdir}/Fedora
%{phpdir}/Fedora/Autoloader
-%exclude %{phpdir}/Fedora/Autoloader/Test
%files devel
%doc *.md
@@ -169,10 +162,24 @@ rm -rf %{buildroot}
%changelog
-* Thu Oct 27 2016 Remi Collet <remi@fedoraproject.org> - 0.2.0-2
+* Fri Oct 28 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.1-2
+- Do not install tests into buildroot
+
+* Fri Oct 28 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.1-1
+- Update to 0.2.1
+- Remove applied patches that are included in 0.2.1
+- Re-add custom include_path and bootstrap for tests
+- Add php-cli build dependency
+
+* Thu Oct 27 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.0-5
+- Add upstream patch "Remove self-autoload constant and prepend
+ self-autoload PSR-4 register"
+- Remove custom include_path and bootstrap for tests
+
+* Thu Oct 27 2016 Remi Collet <remi@fedoraproject.org> - 0.2.0-4
- workaround when not in global autoloader
-* Wed Oct 26 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.0-1
+* Wed Oct 26 2016 Shawn Iwinski <shawn@iwin.ski> - 0.2.0-3
- Update to 0.2.0
- Remove applied patches that are included in 0.2.0