summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Autoload-rpm.patch18
-rw-r--r--composer.json9
-rw-r--r--php-theseer-autoload.spec101
4 files changed, 96 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/Autoload-rpm.patch b/Autoload-rpm.patch
new file mode 100644
index 0000000..0856847
--- /dev/null
+++ b/Autoload-rpm.patch
@@ -0,0 +1,18 @@
+diff -up ./phpab.php.rpm ./phpab.php
+--- ./phpab.php.rpm 2023-06-14 08:18:08.257333519 +0200
++++ ./phpab.php 2023-06-14 08:20:04.223300301 +0200
+@@ -43,12 +43,12 @@
+ * 5 - Duplicates found Error
+ */
+
+-define('PHPAB_VERSION', '%development%');
++define('PHPAB_VERSION', '@VERSION@');
+
+ if (!ini_get('date.timezone')) {
+ ini_set('date.timezone', 'UTC');
+ }
+-require __DIR__ . '/src/autoload.php';
++require '/usr/share/php/TheSeer/Autoload/autoload.php';
+
+ $factory = new \TheSeer\Autoload\Factory();
+ $factory->getCLI()->run($_SERVER);
diff --git a/composer.json b/composer.json
index fa9bf98..5d8e95f 100644
--- a/composer.json
+++ b/composer.json
@@ -2,13 +2,12 @@
"name": "theseer/autoload",
"description": "A tool and library to generate autoload code.",
"require": {
- "theseer/directoryscanner": "~1.3",
- "zetacomponents/console-tools": "~1.7"
+ "php": ">=5.3",
+ "theseer/directoryscanner": "^1.3.3",
+ "zetacomponents/console-tools": "^1.7"
},
"require-dev": {
- "php": ">=5.3",
- "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
- "squizlabs/php_codesniffer": "~1.5"
+ "php": ">=7.2"
},
"autoload": {
"classmap": [
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec
index fb86c6e..0c4a6cc 100644
--- a/php-theseer-autoload.spec
+++ b/php-theseer-autoload.spec
@@ -1,7 +1,7 @@
# remirepo/fedora spec file for php-theseer-autoload
#
-# Copyright (c) 2014-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2014-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 7492afa5fa6724a4b136923a4aab2a713510ba68
+%global gh_commit 177e95d09f546f4dd44666e60ecdd868d0c24904
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner theseer
%global gh_project Autoload
@@ -18,12 +18,18 @@
%global pear_name Autoload
%global pear_channel pear.netpirates.net
+%if 0%{?fedora}
+%bcond_without tests
+%else
+%bcond_with tests
+%endif
+
Name: php-theseer-autoload
-Version: 1.25.8
+Version: 1.28.0
Release: 1%{?dist}
Summary: A tool and library to generate autoload code
-License: BSD
+License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz
@@ -31,35 +37,36 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Patch0: %{gh_project}-rpm.patch
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.1
-# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
-# "squizlabs/php_codesniffer": "~1.5"
+BuildRequires: php(language) >= 7.4
+BuildRequires: php-cli
+BuildRequires: php-date
+BuildRequires: php-json
+BuildRequires: php-openssl
+BuildRequires: php-phar
+BuildRequires: php-spl
+BuildRequires: php-tokenizer
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
-BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
-%global phpunit %{_bindir}/phpunit6
+BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3.2 with php-composer(theseer/directoryscanner) < 2)
+BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
%else
-BuildRequires: php-composer(theseer/directoryscanner) < 2
-BuildRequires: php-composer(theseer/directoryscanner) >= 1.3
-BuildRequires: php-composer(zetacomponents/console-tools) < 2
-BuildRequires: php-composer(zetacomponents/console-tools) >= 1.7
-%global phpunit %{_bindir}/phpunit
+BuildRequires: php-theseer-directoryscanner >= 1.3.2
+BuildRequires: php-zetacomponents-console-tools >= 1.7
%endif
+%if %{with tests}
+%global phpunit %{_bindir}/phpunit9
BuildRequires: %{phpunit}
+%endif
# From composer.json, "require": {
-# "theseer/directoryscanner": "~1.3",
-# "zetacomponents/console-tools": "~1.7"
+# "theseer/directoryscanner": "^1.3.3",
+# "zetacomponents/console-tools": "^1.7.2"
Requires: php(language) >= 5.3.1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
-Requires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
+Requires: (php-composer(theseer/directoryscanner) >= 1.3.2 with php-composer(theseer/directoryscanner) < 2)
+Requires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
%else
-Requires: php-composer(theseer/directoryscanner) < 2
-Requires: php-composer(theseer/directoryscanner) >= 1.3
-Requires: php-composer(zetacomponents/console-tools) < 2
-Requires: php-composer(zetacomponents/console-tools) >= 1.7
+Requires: php-theseer-directoryscanner >= 1.3.2
+Requires: php-zetacomponents-console-tools >= 1.7
%endif
# From phpcompatinfo report for version 1.25.0
Requires: php-cli
@@ -84,7 +91,7 @@ the option of creating static require lists as well as phar archives.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p0 -b .rpm
+%patch -P0 -p0 -b .rpm
: drop composer dependencies
sed -e '\:../vendor/:d' -i src/autoload.php
@@ -118,21 +125,22 @@ sed -e 's:%{php_home}:%{buildroot}%{php_home}:' phpab.php >t.php
php t.php --version | grep %{version}
php t.php --output foo.php src
+%if %{with tests}
: Fix test suite to use installed library
cat <<EOF | tee tests/init.php
<?php
require '%{buildroot}%{_datadir}/php/TheSeer/Autoload/autoload.php';
-class_exists('PHPUnit\Framework\TestCase') or class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');
EOF
ret=0
-for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73 php74; do
+for cmd in "php %{phpunit}" php80 php81 php82 php83; do
if which $cmd; then
set $cmd
- $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1
fi
done
exit $ret
+%endif
%pre
@@ -151,6 +159,41 @@ fi
%changelog
+* Wed Jun 14 2023 Remi Collet <remi@remirepo.net> - 1.28.0-1
+- update to 1.28.0
+
+* Fri Feb 17 2023 Remi Collet <remi@remirepo.net> - 1.27.2-1
+- update to 1.27.2
+
+* Wed Jan 26 2022 Remi Collet <remi@remirepo.net> - 1.27.1-1
+- update to 1.27.1
+
+* Mon Jan 24 2022 Remi Collet <remi@remirepo.net> - 1.27.0-1
+- update to 1.27.0
+
+* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.26.3-2
+- disable test suite on EL
+
+* Mon Jul 26 2021 Remi Collet <remi@remirepo.net> - 1.26.3-1
+- update to 1.26.3 (no change)
+- raise dependency on theseer/directoryscanner 1.3.3
+- raise dependency on zetacomponents/console-tools 1.7.2
+
+* Tue Jun 15 2021 Remi Collet <remi@remirepo.net> - 1.26.1-1
+- update to 1.26.1
+
+* Wed Oct 28 2020 Remi Collet <remi@remirepo.net> - 1.26.0-1
+- update to 1.26.0
+- drop patch merged upstream
+
+* Tue Oct 27 2020 Remi Collet <remi@remirepo.net> - 1.25.9-3
+- add upstream patch for PHP 8
+- add patch for Xdebug 3 from
+ https://github.com/theseer/Autoload/pull/97
+
+* Fri Mar 20 2020 Remi Collet <remi@remirepo.net> - 1.25.9-1
+- update to 1.25.9
+
* Mon Nov 25 2019 Remi Collet <remi@remirepo.net> - 1.25.8-1
- update to 1.25.8