summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-23 14:54:23 +0100
committerRemi Collet <remi@remirepo.net>2020-03-23 14:54:23 +0100
commit6865cda8fe4b704b9a12ad3b40647caed30f69ef (patch)
treef28f293266692e43df97826e51c23b113f045f4a
parent261410aec2395ad11f1546820f71066389e9c956 (diff)
add classmap autoloader
-rw-r--r--php-pear-crypt-gpg.spec26
1 files changed, 19 insertions, 7 deletions
diff --git a/php-pear-crypt-gpg.spec b/php-pear-crypt-gpg.spec
index 179991f..d2078f4 100644
--- a/php-pear-crypt-gpg.spec
+++ b/php-pear-crypt-gpg.spec
@@ -15,12 +15,10 @@
%else
%global with_tests 0%{!?_without_tests:1}
%endif
-# remirepo:1
-%global with_tests 0%{?_with_tests:1}
Name: php-pear-crypt-gpg
Version: 1.6.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GNU Privacy Guard (GnuPG)
License: LGPLv2+
@@ -34,7 +32,7 @@ BuildArch: noarch
BuildRequires: php-pear(PEAR)
%if %{with_tests}
# for tests
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: phpunit7
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 6
BuildRequires: %{_bindir}/gpg1
%else
@@ -43,6 +41,7 @@ BuildRequires: %{_bindir}/gpg
BuildRequires: %{_bindir}/gpg-agent
BuildRequires: %{_bindir}/ps
%endif
+BuildRequires: php-fedora-autoloader-devel
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -65,9 +64,11 @@ Requires: php-pcre
Requires: php-spl
# Optional
Requires: php-posix
+Requires: php-composer(fedora/autoloader)
Provides: php-pear(%{pear_name}) = %{version}
Provides: php-composer(pear/crypt_gpg) = %{version}
+Provides: php-autoloader(pear/crypt_gpg) = %{version}
%description
@@ -77,6 +78,8 @@ GNU Privacy Guard (GnuPG).
Though GnuPG can support symmetric-key cryptography, this package
is intended only to facilitate public-key cryptography.
+Autoloader: %{pear_phpdir}/Crypt/GPG/autoload.php
+
%prep
%setup -q -c
@@ -97,6 +100,8 @@ mv ../package.xml %{name}.xml
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.
+phpab --template fedora --output Crypt/GPG/autoload.php Crypt
+
%install
cd %{pear_name}-%{version}
@@ -109,17 +114,21 @@ rm -rf %{buildroot}%{pear_metadir}/.??*
mkdir -p %{buildroot}%{pear_xmldir}
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
+# Autoloader
+install -pm 644 Crypt/GPG/autoload.php %{buildroot}/%{pear_phpdir}/Crypt/GPG/autoload.php
+
%if %{with_tests}
%check
cd %{pear_name}-%{version}/tests
: Upstream test suite
-# PHP 7.2: https://pear.php.net/bugs/bug.php?id=21240
ret=0
-for cmd in php php70 php71 php72; do
+for cmd in php php72 php73 php74; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose . || ret=1
+ $cmd %{_bindir}/phpunit7 \
+ --include-path=%{buildroot}%{pear_phpdir} \
+ --verbose . || ret=1
fi
done
exit $ret
@@ -149,6 +158,9 @@ fi
%changelog
+* Mon Mar 23 2020 Remi Collet <remi@remirepo.net> - 1.6.4-2
+- add classmap autoloader
+
* Mon Mar 23 2020 Remi Collet <remi@remirepo.net> - 1.6.4-1
- update to 1.6.4