summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-03-09 14:11:38 +0100
committerRemi Collet <remi@php.net>2023-03-09 14:11:38 +0100
commit86ab6ceea1ff729299b1d2dc589b3bef6f1293b7 (patch)
treeefd78d5d0b019644792f025395e079ae0d077617
parent3a09319844027ff245b7b9404eb20d56fb90d85d (diff)
define %scl_vendor and %_scl_prefix in macros.php81-config
move man page out of scl tree improve the man page
-rw-r--r--README18
-rw-r--r--macros-build4
-rw-r--r--php74.spec21
3 files changed, 27 insertions, 16 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..ba4632d 100644
--- a/macros-build
+++ b/macros-build
@@ -1,4 +1,6 @@
-%_sclreq (%{scl_vendor})
+%scl_vendor @VENDOR@
+%_scl_prefix @PREFIX@
+%_sclreq (@VENDOR@)
%scl_package_override() %{expand:
%{?@SCL@___pear:%global __pear %@SCL@___pear}
diff --git a/php74.spec b/php74.spec
index ffc687a..9f5cc87 100644
--- a/php74.spec
+++ b/php74.spec
@@ -1,7 +1,7 @@
# remirepo spec file for php74 SCL metapackage
#
-# Copyright (c) 2018-2020 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2018-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -26,8 +26,8 @@
Summary: Package that installs PHP 7.4
Name: %scl_name
Version: 7.4
-Release: 1%{?dist}
-License: GPLv2+
+Release: 2%{?dist}
+License: GPL-2.0-or-later
Source0: macros-build
Source1: README
@@ -150,7 +150,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
@@ -162,7 +162,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
@@ -174,7 +174,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
@@ -221,7 +221,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
%{_root_datadir}/Modules/modulefiles/%{scl_name}
@@ -247,6 +247,11 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%changelog
+* Thu Mar 9 2023 Remi Collet <remi@remirepo.net> 8.0-2
+- define %%scl_vendor and %%_scl_prefix in macros.php81-config
+- move man page out of scl tree
+- improve the man page
+
* Tue Nov 9 2021 Remi Collet <remi@remirepo.net> 7.4-1
- EL-9 build