diff options
-rw-r--r-- | php55.spec | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -3,9 +3,10 @@ %global scl %{scl_name_base}%{scl_name_version} %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_root_sysconfdir}/rpm; echo $d) %if 0%{?fedora} >= 20 -# Requires scl-utils v2 +# Requires scl-utils v2 for SCL integration %global with_modules 1 %else +# Works with file installed in /usr/share/Modules/modulefiles/ %global with_modules 0 %endif %scl_package %scl @@ -16,7 +17,7 @@ Summary: Package that installs PHP 5.5 Name: %scl_name Version: 2.1 -Release: 4%{?dist} +Release: 5%{?dist} Group: Development/Languages License: GPLv2+ @@ -29,6 +30,7 @@ BuildRequires: scl-utils-build BuildRequires: help2man # Temporary work-around BuildRequires: iso-codes +BuildRequires: environment-modules Requires: %{?scl_prefix}php-common%{?_isa} >= 5.5.30 Requires: %{?scl_prefix}php-cli%{?_isa} @@ -44,6 +46,7 @@ that install PHP 5.5 language. Summary: Package that handles %scl Software Collection. Group: Development/Languages Requires: scl-utils +Requires: environment-modules Requires(post): %{_root_sbindir}/semanage Requires(post): %{_root_sbindir}/selinuxenabled Provides: %{?scl_name}-runtime(%{scl_vendor}) @@ -83,7 +86,6 @@ export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}} export MANPATH=%{_mandir}:\${MANPATH} EOF -%if %{with_modules} # Broken: /usr/share/Modules/bin/createmodule.sh enable | tee envmod # See https://bugzilla.redhat.com/show_bug.cgi?id=1197321 cat << EOF | tee envmod @@ -94,7 +96,6 @@ prepend-path LD_LIBRARY_PATH %{_libdir} prepend-path MANPATH %{_mandir} prepend-path PKG_CONFIG_PATH %{_libdir}/pkgconfig EOF -%endif # generate rpm macros file for depended collections cat << EOF | tee scldev @@ -128,6 +129,8 @@ help2man -N --section 7 ./h2m_helper -o %{scl_name}.7 install -D -m 644 enable %{buildroot}%{_scl_scripts}/enable %if %{with_modules} install -D -m 644 envmod %{buildroot}%{_scl_scripts}/%{scl_name} +%else +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 @@ -174,6 +177,9 @@ restorecon -R %{?_scl_root} &>/dev/null || : %{_mandir}/man7/%{scl_name}.* %{?_licensedir:%{_datadir}/licenses} %{_datadir}/tests +%if ! %{with_modules} +%{_root_datadir}/Modules/modulefiles/%{scl_name} +%endif %files build @@ -187,6 +193,9 @@ restorecon -R %{?_scl_root} &>/dev/null || : %changelog +* Thu Mar 10 2016 Remi Collet <remi@fedoraproject.org> 2.1-5 +- add module file for EL + * Thu Mar 10 2016 Remi Collet <remi@fedoraproject.org> 2.1-4 - fix override for pecl_xmldir |