summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-02-20 12:14:49 +0100
committerRemi Collet <remi@remirepo.net>2019-02-20 12:14:49 +0100
commitbb5eccf8e97a323e75b1462190124deae73d1ba7 (patch)
treecf28d3521b1ca547b641b1d365961c9893f1ffe2
parentb33d4c3ce19a99664256214c5bce48347a89bc6f (diff)
add syspaths sub package providing system-wide wrappers
-rw-r--r--php72.spec57
1 files changed, 55 insertions, 2 deletions
diff --git a/php72.spec b/php72.spec
index 10e5687..ca517b2 100644
--- a/php72.spec
+++ b/php72.spec
@@ -33,8 +33,8 @@
Summary: Package that installs PHP 7.2
Name: %scl_name
-Version: 1.0
-Release: 3%{?dist}
+Version: 2.0
+Release: 1%{?dist}
Group: Development/Languages
License: GPLv2+
@@ -93,6 +93,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: php56-syspaths
+Conflicts: php70-syspaths
+Conflicts: php71-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
@@ -174,6 +199,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.
@@ -217,7 +255,22 @@ restorecon -R %{_localstatedir} &>/dev/null || :
%defattr(-,root,root)
%{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-3
- cleanup for EL-8