summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README18
-rw-r--r--macros-build6
-rw-r--r--php56.spec77
3 files changed, 84 insertions, 17 deletions
diff --git a/README b/README
index 98cb9ef..e808e0b 100644
--- a/README
+++ b/README
@@ -23,12 +23,14 @@ which adds support for the PHP language to Apache HTTP server.
The %{?scl_prefix}php-fpm package provides the FastCGI process manager
which adds support for the PHP language to FastCGI compatible servers.
-FastCGI process manager (php-fpm) listens on local network soket
-(by default port 9000).
+FastCGI process manager (php-fpm) listens on local soket
+(by default %{_localstatedir}/run/php-fpm/www.sock).
When working with %{scl_name} collection, use the "scl" utility (see
scl(1) for usage) to enable the scl environment properly.
+You can alternatively use the "module" utility (see module(1) for usage).
+
Configuration for the %{scl_name} software collection is located under %{_sysconfdir}.
Examples:
@@ -46,9 +48,11 @@ scl enable %{scl_name} 'man php'
Show man pages for php command, which is part of the %{scl_name} software
collection.
-%if 0%{?rhel} >= 7
+module load %{scl_name}
+ Enable %{scl_name} software collection in current interactive shell.
+
+module unload %{scl_name}
+ Disable %{scl_name} software collection in current interactive shell.
+
systemctl start %{?scl_prefix}php-fpm
-%else
-service %{?scl_prefix}php-fpm start
-%endif
- Starts the php-fpm server from %{scl_name} software collection. \ No newline at end of file
+ Starts the php-fpm server from %{scl_name} software collection.
diff --git a/macros-build b/macros-build
index 03ff02d..c7cab7c 100644
--- a/macros-build
+++ b/macros-build
@@ -1,9 +1,13 @@
-%_sclreq (%{scl_vendor})
+%scl_vendor @VENDOR@
+%_scl_prefix @PREFIX@
+%_sclreq (@VENDOR@)
%scl_package_override() %{expand:
%{?@SCL@___pear:%global __pear %@SCL@___pear}
%{?@SCL@___pecl:%global __pecl %@SCL@___pecl}
%{?@SCL@___php:%global __php %@SCL@___php}
+ %{?@SCL@___phpize:%global __phpize %@SCL@___phpize}
+ %{?@SCL@___phpconfig:%global __phpconfig %@SCL@___phpconfig}
%{?@SCL@_pecl_xmldir:%global pecl_xmldir %@SCL@_pecl_xmldir}
%global pear_metadir %@SCL@_pear_metadir
%global pear_xmldir %@SCL@_pear_xmldir
diff --git a/php56.spec b/php56.spec
index 1f37d22..32b8da9 100644
--- a/php56.spec
+++ b/php56.spec
@@ -1,7 +1,7 @@
# remirepo spec file for php56 SCL metapackage
#
-# Copyright (c) 2013-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -31,10 +31,10 @@
Summary: Package that installs PHP 5.6
Name: %scl_name
-Version: 2.3
-Release: 3%{?dist}
+Version: 5.6
+Release: 1%{?dist}
Group: Development/Languages
-License: GPLv2+
+License: GPL-2.0-or-later
Source0: macros-build
Source1: README
@@ -92,6 +92,31 @@ Package shipping development files, especially usefull for development of
packages depending on %scl Software Collection.
+%package syspaths
+Summary: System-wide wrappers for the %{name} package
+Requires: %{?scl_name}-runtime%{?_isa} = %{version}-%{release}
+Requires: %{?scl_name}-php-cli%{?_isa}
+Requires: %{?scl_name}-php-common%{?_isa}
+Conflicts: php-common
+Conflicts: php-cli
+Conflicts: php54-syspaths
+Conflicts: php55-syspaths
+Conflicts: php70-syspaths
+Conflicts: php71-syspaths
+Conflicts: php72-syspaths
+Conflicts: php73-syspaths
+
+%description syspaths
+System-wide wrappers for the %{name}-php-cli package.
+
+Using the %{name}-syspaths package does not require running the
+'scl enable' or 'module command. This package practically replaces the system
+default php-cli package. It provides the php, phar and php-cgi commands.
+
+Note that the php-cli and %{name}-syspaths packages conflict and cannot
+be installed on one system.
+
+
%prep
%setup -c -T
@@ -136,7 +161,7 @@ cp %{SOURCE2} .
# generate a helper script that will be used by help2man
cat >h2m_helper <<'EOF'
#!/bin/bash
-[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
+[ "$1" == "--version" ] && echo "%{scl_name} Software Collection (PHP %{version})" || cat README
EOF
chmod a+x h2m_helper
@@ -152,7 +177,7 @@ install -D -m 644 envmod %{buildroot}%{_scl_scripts}/%{scl_name}
install -D -m 644 envmod %{buildroot}%{_root_datadir}/Modules/modulefiles/%{scl_name}
%endif
install -D -m 644 scldev %{buildroot}%{macrosdir}/macros.%{scl_name_base}-scldevel
-install -D -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
+install -D -m 644 %{scl_name}.7 %{buildroot}%{_root_mandir}/man7/%{scl_name}.7
install -d -m 755 %{buildroot}%{_datadir}/licenses
install -d -m 755 %{buildroot}%{_datadir}/doc/pecl
@@ -162,7 +187,7 @@ install -d -m 755 %{buildroot}%{_localstatedir}/lib/pear/pkgxml
%scl_install
# Add the scl_package_override macro
-sed -e 's/@SCL@/%{scl}/g' %{SOURCE0} \
+sed -e 's/@SCL@/%{scl}/g;s:@PREFIX@:/opt/%{scl_vendor}:;s/@VENDOR@/%{scl_vendor}/' %{SOURCE0} \
| tee -a %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
# Move in correct location, if needed
@@ -179,6 +204,19 @@ mkdir -p %{buildroot}%{_root_localstatedir}/opt/%{scl_vendor}
ln -s %{_localstatedir} %{buildroot}%{_root_localstatedir}/opt/%{scl_vendor}/%{scl}
%endif
+# syspaths
+mkdir -p %{buildroot}%{_root_sysconfdir}
+ln -s %{_sysconfdir}/php.ini %{buildroot}%{_root_sysconfdir}/php.ini
+ln -s %{_sysconfdir}/php.d %{buildroot}%{_root_sysconfdir}/php.d
+mkdir -p %{buildroot}%{_root_bindir}
+ln -s %{_bindir}/php %{buildroot}%{_root_bindir}/php
+ln -s %{_bindir}/phar %{buildroot}%{_root_bindir}/phar
+ln -s %{_bindir}/php-cgi %{buildroot}%{_root_bindir}/php-cgi
+mkdir -p %{buildroot}%{_root_mandir}/man1
+ln -s %{_mandir}/man1/php.1.gz %{buildroot}%{_root_mandir}/man1/php.1.gz
+ln -s %{_mandir}/man1/phar.1.gz %{buildroot}%{_root_mandir}/man1/phar.1.gz
+ln -s %{_mandir}/man1/php-cgi.1.gz %{buildroot}%{_root_mandir}/man1/php-cgi.1.gz
+
%post runtime
# Simple copy of context from system root to SCL root.
@@ -209,7 +247,7 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%license LICENSE
%doc README
%scl_files
-%{_mandir}/man7/%{scl_name}.*
+%{_root_mandir}/man7/%{scl_name}.*
%{?_licensedir:%{_datadir}/licenses}
%{_datadir}/tests
%if ! %{with_modules}
@@ -232,6 +270,27 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%changelog
+%files syspaths
+%{_root_sysconfdir}/php.ini
+%{_root_sysconfdir}/php.d
+%{_root_bindir}/php
+%{_root_bindir}/phar
+%{_root_bindir}/php-cgi
+%{_root_mandir}/man1/php.1.gz
+%{_root_mandir}/man1/phar.1.gz
+%{_root_mandir}/man1/php-cgi.1.gz
+
+
+%changelog
+* Wed Jun 21 2023 Remi Collet <remi@remirepo.net> 5.6-1
+- define %%scl_vendor and %%_scl_prefix in macros.php56-config
+- redefine %%__phpize and %%__phpconfig
+- move man page out of scl tree
+- improve the man page
+
+* Wed Feb 20 2019 Remi Collet <remi@remirepo.net> 3.0-1
+- add syspaths sub package providing system-wide wrappers
+
* Mon Jan 21 2019 Remi Collet <remi@remirepo.net> 2.3-3
- cleanup for EL-8