summaryrefslogtreecommitdiffstats
path: root/php73.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php73.spec')
-rw-r--r--php73.spec56
1 files changed, 54 insertions, 2 deletions
diff --git a/php73.spec b/php73.spec
index 8a7461e..1b9473c 100644
--- a/php73.spec
+++ b/php73.spec
@@ -33,8 +33,8 @@
Summary: Package that installs PHP 7.3
Name: %scl_name
-Version: 1.0
-Release: 2%{?dist}
+Version: 2.0
+Release: 1%{?dist}
License: GPLv2+
Source0: macros-build
@@ -87,6 +87,31 @@ Requires: %{?scl_name}-runtime%{?_isa} = %{version}-%{release}
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: php56-syspaths
+Conflicts: php70-syspaths
+Conflicts: php71-syspaths
+Conflicts: php72-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
@@ -169,6 +194,19 @@ if [ "%{_root_sysconfdir}/rpm" != "%{macrosdir}" ]; then
%{buildroot}%{macrosdir}/macros.%{scl}-config
fi
+# 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,21 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%files scldevel
%{macrosdir}/macros.%{scl_name_base}-scldevel
+%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 Feb 20 2019 Remi Collet <remi@remirepo.net> 2.0-1
+- add syspaths sub package providing system-wide wrappers
+
* Thu Jan 17 2019 Remi Collet <remi@remirepo.net> 1.0-2
- cleanup for EL-8