diff options
-rw-r--r-- | README | 18 | ||||
-rw-r--r-- | macros-build | 6 | ||||
-rw-r--r-- | php81.spec | 54 |
3 files changed, 52 insertions, 26 deletions
@@ -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 @@ -1,8 +1,8 @@ # remirepo spec file for php81 SCL metapackage # -# Copyright (c) 2018-2021 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -11,12 +11,7 @@ %global scl %{scl_name_base}%{scl_name_version} %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_root_sysconfdir}/rpm; echo $d) %global install_scl 1 - -%if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 %global rh_layout 1 -%else -%global nfsmountable 1 -%endif %scl_package %scl @@ -26,8 +21,8 @@ Summary: Package that installs PHP 8.1 Name: %scl_name Version: 8.1 -Release: 1%{?dist} -License: GPLv2+ +Release: 5%{?dist} +License: GPL-2.0-or-later Source0: macros-build Source1: README @@ -42,6 +37,13 @@ BuildRequires: environment-modules Requires: %{?scl_prefix}php-common%{?_isa} Requires: %{?scl_prefix}php-cli%{?_isa} Requires: %{?scl_name}-runtime%{?_isa} = %{version}-%{release} +# this a meta-package, so commonly used SAPI / extensions: +Recommends: %{?scl_prefix}php-fpm%{?_isa} +Recommends: %{?scl_prefix}php-mbstring%{?_isa} +Recommends: %{?scl_prefix}php-opcache%{?_isa} +Recommends: %{?scl_prefix}php-pdo%{?_isa} +Recommends: %{?scl_prefix}php-sodium%{?_isa} +Recommends: %{?scl_prefix}php-xml%{?_isa} %description This is the main package for %scl Software Collection, @@ -53,7 +55,11 @@ Summary: Package that handles %scl Software Collection. Requires: scl-utils Requires: environment-modules Requires(post): %{_root_sbindir}/semanage +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11 +Requires(post): %{_root_bindir}/selinuxenabled +%else Requires(post): %{_root_sbindir}/selinuxenabled +%endif Provides: %{?scl_name}-runtime(%{scl_vendor}) Provides: %{?scl_name}-runtime(%{scl_vendor})%{?_isa} @@ -152,7 +158,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 @@ -164,7 +170,7 @@ help2man -N --section 7 ./h2m_helper -o %{scl_name}.7 install -D -m 644 enable %{buildroot}%{_scl_scripts}/enable install -D -m 644 envmod %{buildroot}%{_root_datadir}/Modules/modulefiles/%{scl_name} 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 @@ -176,7 +182,7 @@ install -d -m 755 %{buildroot}%{_localstatedir}/lib/pear/pkgxml cat %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config # 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 @@ -215,15 +221,11 @@ restorecon -R %{_localstatedir} &>/dev/null || : %files -%if 0%{?fedora} < 19 && 0%{?rhel} < 7 -%files runtime -%else %files runtime -f filesystem -%endif %license LICENSE %doc README %scl_files -%{_mandir}/man7/%{scl_name}.* +%{_root_mandir}/man7/%{scl_name}.* %{?_licensedir:%{_datadir}/licenses} %{_datadir}/tests %{_root_datadir}/Modules/modulefiles/%{scl_name} @@ -249,6 +251,22 @@ restorecon -R %{_localstatedir} &>/dev/null || : %changelog +* Fri Feb 14 2025 Remi Collet <remi@remirepo.net> 8.1-5 +- F42: fix dependencies +- re-license spec file to CECILL-2.1 + +* Wed Apr 26 2023 Remi Collet <remi@remirepo.net> 8.1-4 +- redefine %%__phpize and %%__phpconfig + +* Thu Mar 9 2023 Remi Collet <remi@remirepo.net> 8.1-3 +- define %%scl_vendor and %%_scl_prefix in macros.php81-config +- move man page out of scl tree +- improve the man page + +* Fri Jul 9 2021 Remi Collet <remi@remirepo.net> 8.1-2 +- add weak dependencies on commonly used SAPI and extensions: + fpm, mbstring, opcache, pdo, sodium and xml + * Fri Jun 4 2021 Remi Collet <remi@remirepo.net> 8.1-1 - initial package for 8.1 |