Disable PHP support.

This commit is contained in:
Julien Enselme 2016-06-28 19:28:43 +02:00
parent 9c1aea93f5
commit 22e80cc721

View File

@ -1,12 +1,15 @@
%global ini_name 40-mapserver.ini %global ini_name 40-mapserver.ini
%global project_owner mapserver %global project_owner mapserver
%global project_name mapserver %global project_name mapserver
# MapServer doesn't support PHP 7 yet. See:
# https://github.com/mapserver/mapserver/issues/5252
%global php_mapscript 0
%global commit 6ae2bc6915d73417f4fea78201d4f7087c25b3f1 %global commit 6ae2bc6915d73417f4fea78201d4f7087c25b3f1
%global shortcommit %(c=%{commit}; echo ${c:0:7}) %global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: mapserver Name: mapserver
Version: 7.0.1 Version: 7.0.1
Release: 2.git%{shortcommit}%{?dist} Release: 3.git%{shortcommit}%{?dist}
Summary: Environment for building spatially-enabled internet applications Summary: Environment for building spatially-enabled internet applications
Group: Development/Tools Group: Development/Tools
@ -68,6 +71,7 @@ Requires: %{name} = %{version}
%description devel %description devel
This package contains development files for mapserver. This package contains development files for mapserver.
%if 0%{php_mapscript}
%package -n php-%{name} %package -n php-%{name}
Summary: PHP/Mapscript map making extensions to PHP Summary: PHP/Mapscript map making extensions to PHP
Group: Development/Languages Group: Development/Languages
@ -79,6 +83,7 @@ Requires: php(api) = %{php_core_api}
%description -n php-%{name} %description -n php-%{name}
The PHP/Mapscript extension provides full map customization capabilities within The PHP/Mapscript extension provides full map customization capabilities within
the PHP scripting language. the PHP scripting language.
%endif # end php_mapscript
%package perl %package perl
@ -173,7 +178,9 @@ cmake -DINSTALL_LIB_DIR=%{_libdir} \
-DWITH_MYSQL=TRUE \ -DWITH_MYSQL=TRUE \
-DWITH_PERL=TRUE \ -DWITH_PERL=TRUE \
-DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \ -DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \
%if 0%{php_mapscript}
-DWITH_PHP=TRUE \ -DWITH_PHP=TRUE \
%endif # end php_mapscript
-DWITH_POSTGIS=TRUE \ -DWITH_POSTGIS=TRUE \
-DWITH_PROJ=TRUE \ -DWITH_PROJ=TRUE \
-DWITH_PYTHON=TRUE \ -DWITH_PYTHON=TRUE \
@ -204,8 +211,10 @@ make %{?_smp_mflags}
%install %install
mkdir -p %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_libexecdir}
%if 0%{php_mapscript}
mkdir -p %{buildroot}%{php_inidir} mkdir -p %{buildroot}%{php_inidir}
mkdir -p %{buildroot}%{php_extdir} mkdir -p %{buildroot}%{php_extdir}
%endif # end php_mapscript
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_includedir}/%{name}/ mkdir -p %{buildroot}%{_includedir}/%{name}/
@ -223,12 +232,14 @@ install -p -m 644 *.h %{buildroot}%{_includedir}/%{name}/
cd build cd build
make DESTDIR=%{buildroot} install %{?_smp_mflags} make DESTDIR=%{buildroot} install %{?_smp_mflags}
%if 0%{php_mapscript}
# install php config file # install php config file
mkdir -p %{buildroot}%{php_inidir} mkdir -p %{buildroot}%{php_inidir}
cat > %{buildroot}%{php_inidir}/%{ini_name} <<EOF cat > %{buildroot}%{php_inidir}/%{ini_name} <<EOF
; Enable %{name} extension module ; Enable %{name} extension module
extension=php_mapscript.so extension=php_mapscript.so
EOF EOF
%endif # end php_mapscript
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -262,11 +273,13 @@ EOF
%{_libdir}/libmapserver.so %{_libdir}/libmapserver.so
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%if 0%{php_mapscript}
%files -n php-%{name} %files -n php-%{name}
%doc mapscript/php/README %doc mapscript/php/README
%doc mapscript/php/examples %doc mapscript/php/examples
%config(noreplace) %{php_inidir}/%{ini_name} %config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/php_mapscript.so* %{php_extdir}/php_mapscript.so*
%endif # end php_mapscript
%files perl %files perl
%doc README %doc README
@ -295,6 +308,9 @@ EOF
%changelog %changelog
* Tue Jun 28 2016 Julien Enselme <jujens@jujens.eu> - 7.0.1-3.git6ae2bc6
- Disable PHP support.
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 7.0.1-2.git6ae2bc6 * Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 7.0.1-2.git6ae2bc6
- Perl 5.24 rebuild - Perl 5.24 rebuild