summaryrefslogtreecommitdiffstats
path: root/php54.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php54.spec')
-rw-r--r--php54.spec16
1 files changed, 10 insertions, 6 deletions
diff --git a/php54.spec b/php54.spec
index f9d77f0..aef2238 100644
--- a/php54.spec
+++ b/php54.spec
@@ -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
@@ -29,9 +30,7 @@ BuildRequires: scl-utils-build
BuildRequires: help2man
# Temporary work-around
BuildRequires: iso-codes
-%if %{with_modules}
BuildRequires: environment-modules
-%endif
Requires: %{?scl_prefix}php-common%{?_isa} >= 5.4.45
Requires: %{?scl_prefix}php-cli%{?_isa}
@@ -47,6 +46,7 @@ that install PHP 5.4 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})
@@ -86,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
@@ -97,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
@@ -131,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
@@ -177,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
@@ -191,7 +194,8 @@ restorecon -R %{?_scl_root} &>/dev/null || :
%changelog
* Thu Mar 10 2016 Remi Collet <remi@fedoraproject.org> 2.1-4
-- fix override for pecl_xmldir
+- fix override for pecl_xmldir (F24)
+- add module file for EL
* Tue Jan 5 2016 Remi Collet <remi@fedoraproject.org> 2.1-3
- add missing "sbin" in PATH (Fedora)