summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pear.spec51
1 files changed, 44 insertions, 7 deletions
diff --git a/php-pear.spec b/php-pear.spec
index 5fb388b..45068c9 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -40,7 +40,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.5
-Release: 2%{?dist}
+Release: 4%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -72,6 +72,7 @@ BuildRequires: %{?scl_prefix}php-devel
%if %{with_tests}
BuildRequires: %{_bindir}/phpunit
%endif
+BuildRequires: php-fedora-autoloader-devel
# Temporary
%{?scl:Obsoletes: %{scl_prefix}fakepear}
@@ -83,11 +84,16 @@ Provides: %{?scl_prefix}php-pear(Structures_Graph) = %{structver}
Provides: %{?scl_prefix}php-pear(XML_Util) = %{xmlutil}
Provides: %{?scl_prefix}php-pear(PEAR_Manpages) = %{manpages}
-Provides: %{?scl_prefix}php-composer(pear/console_getopt) = %{getoptver}
-Provides: %{?scl_prefix}php-composer(pear/archive_tar) = %{arctarver}
-Provides: %{?scl_prefix}php-composer(pear/pear-core-minimal) = %{version}
-Provides: %{?scl_prefix}php-composer(pear/structures_graph) = %{structver}
-Provides: %{?scl_prefix}php-composer(pear/xml_util) = %{xmlutil}
+Provides: %{?scl_prefix}php-composer(pear/console_getopt) = %{getoptver}
+Provides: %{?scl_prefix}php-autoloader(pear/console_getopt) = %{getoptver}
+Provides: %{?scl_prefix}php-composer(pear/archive_tar) = %{arctarver}
+Provides: %{?scl_prefix}php-autoloader(pear/archive_tar) = %{arctarver}
+Provides: %{?scl_prefix}php-composer(pear/pear-core-minimal) = %{version}
+Provides: %{?scl_prefix}php-autoloader(pear/pear-core-minimal) = %{version}
+Provides: %{?scl_prefix}php-composer(pear/structures_graph) = %{structver}
+Provides: %{?scl_prefix}php-autoloader(pear/structures_graph) = %{structver}
+Provides: %{?scl_prefix}php-composer(pear/xml_util) = %{xmlutil}
+Provides: %{?scl_prefix}php-autoloader(pear/xml_util) = %{xmlutil}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# From other third party
@@ -134,6 +140,7 @@ Requires: httpd-filesystem
%else
%global with_html_dir 1
%endif
+Requires: php-composer(fedora/autoloader)
%description
@@ -173,7 +180,29 @@ sed -e 's/@SCL@/%{?scl:%{scl}_}/' \
%build
-# This is an empty build section.
+# Create per package autoloader
+phpab --template fedora \
+ --output PEAR/autoload.php\
+ PEAR OS System.php PEAR.php
+
+phpab --template fedora \
+ --output Structures/Graph/autoload.php \
+ Structures
+
+mkdir Archive/Tar
+phpab --template fedora \
+ --output Archive/Tar/autoload.php \
+ Archive
+
+mkdir Console/Getopt
+phpab --template fedora \
+ --output Console/Getopt/autoload.php \
+ Console
+
+mkdir XML/Util
+phpab --template fedora \
+ --output XML/Util/autoload.php \
+ XML
%install
@@ -254,6 +283,11 @@ install -m 755 -d %{buildroot}%{_root_bindir}
ln -s %{_bindir}/pear %{buildroot}%{_root_bindir}/%{scl_prefix}pear
%endif
+# install autoloaders
+for i in PEAR/autoload.php Structures/Graph/autoload.php Archive/Tar/autoload.php Console/Getopt/autoload.php XML/Util/autoload.php
+do install -Dpm 644 $i %{buildroot}%{peardir}/$i
+done
+
%check
# Check that no bogus paths are left in the configuration, or in
@@ -418,6 +452,9 @@ fi
%changelog
+* Tue Dec 19 2017 Remi Collet <remi@remirepo.net> - 1:1.10.5-4
+- add autoloader for each package
+
* Thu Jun 29 2017 Remi Collet <remi@remirepo.net> - 1:1.10.5-2
- update XML_Util to 1.4.3 (no change)