diff --git a/mapserver.changes b/mapserver.changes index 14f5fe1..402b4d9 100644 --- a/mapserver.changes +++ b/mapserver.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Mar 9 12:06:56 UTC 2022 - Jan Engelhardt + +- Make the package build on current Tumbleweed again: + * Disable PHP bindings (fails to build) + * Disable PostgreSQL (fails to configure) +- Have mapserver-devel require the accompanying library + ------------------------------------------------------------------- Thu Nov 11 16:38:03 UTC 2021 - Boris Manojlovic diff --git a/mapserver.spec b/mapserver.spec index b814667..13c0db2 100644 --- a/mapserver.spec +++ b/mapserver.spec @@ -18,16 +18,16 @@ # +%bcond_with php +%bcond_with postgres %bcond_with ruby - -# %bcond_without python %define libname libmapserver2 %define _cgibindir /srv/www/cgi-bin -%if 0%{?suse_version} >= 1500 -%define php_name php7 +%if 0%{?suse_version} >= 1550 +%define php_name php8 %else -%define php_name php5 +%define php_name php7 %endif Name: mapserver @@ -69,10 +69,12 @@ BuildRequires: mysql-devel BuildRequires: openjpeg2-devel BuildRequires: pam BuildRequires: pam-devel +%if 0%{?with postgres} BuildRequires: postgresql-devel >= 9.1 %if 0%{?suse_version} >= 1500 BuildRequires: postgresql-server-devel >= 9.1 %endif +%endif BuildRequires: libprotobuf-c-devel BuildRequires: proj BuildRequires: protobuf-c @@ -100,10 +102,8 @@ Group: System/Libraries Mapserver library for mapserver or mapscript module. you need this lib to run mapserver or any of the mapscript module (php, java, python, ruby) - - -# We don't require apache2_mod-php5 users could have php5 running -# with other modes (cgi, php-fpm etc) +# We don't require apache2_mod-php8 users could have php5 running +# with other modes (cgi, php-fpm, etc) %package -n php-mapscript Summary: PHP/Mapscript map making extensions to PHP @@ -112,7 +112,9 @@ Requires: %{libname} = %{version}-%{release} Requires: apache2 Provides: php-mapserver = %{version}-%{release} Obsoletes: php-mapserver < %{version}-%{release} +%if 0%{?with php} BuildRequires: php-devel +%endif Requires: php Requires: php-gd @@ -175,12 +177,13 @@ Obsoletes: mapserver-java < %{version}-%{release} The Java/Mapscript extension provides full map customization capabilities within the Java programming language. -%if %{with ruby} %package -n ruby-mapscript Summary: Ruby/Mapscript map making extensions to Ruby Group: Development/Languages/Ruby +%if %{with ruby} BuildRequires: ruby-common BuildRequires: ruby-devel +%endif Requires: %{libname} = %{version}-%{release} Requires: ruby Provides: mapserver-ruby = %{version}-%{release} @@ -189,27 +192,28 @@ Obsoletes: mapserver-ruby < %{version}-%{release} %description -n ruby-mapscript The Ruby/Mapscript extension provides full map customization capabilities within the Ruby programming language. -%endif %package devel Summary: Mapserver development files Group: Development/Libraries/Other -Requires: %{name} = %{version}-%{release} +Requires: %{libname} = %{version}-%{release} %description devel The Mapserver development package provides necessary files to build against the C Mapserver library. %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 +%autosetup -p1 %build mkdir build cd build #Pre export the PREFIX ( having it on the command line doesn't expand correctly for #dynamic postgresql location -export CMAKE_PREFIX_PATH="%{_includedir}:%{_includedir}/fastcgi:%%(pg_config --includedir):%%(pg_config --includedir-server):%%(pg_config --libdir)" +export CMAKE_PREFIX_PATH="%{_includedir}:%{_includedir}/fastcgi" +%if 0%{?with postgres} +export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:%%(pg_config --includedir):%%(pg_config --includedir-server):%%(pg_config --libdir)" +%endif export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="%{optflags} -fno-strict-aliasing" @@ -243,8 +247,12 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DWITH_MYSQL=TRUE \ -DWITH_PERL=TRUE \ -DCUSTOM_PERL_SITE_ARCH_DIR="%{perl_vendorarch}" \ +%if 0%{?with php} -DWITH_PHPNG=TRUE \ +%endif +%if 0%{?with postgres} -DWITH_POSTGIS=TRUE \ +%endif -DWITH_PROJ=TRUE \ -DUSE_PROJ=TRUE \ -DWITH_PROTOBUFC=TRUE \ @@ -292,20 +300,20 @@ cp *.h %{buildroot}/%{_includedir}/%{name}/ # fix some exec bits essentially on examples to make rpmlint happy # and avoid rpm adding require -find ./mapscript/ -type f -iname "*.p[ly]" -exec chmod -x {} \; -find ./mapscript/ -type f -iname "*.rb" -exec chmod -x {} \; -find ./mapscript/ -type f -iname "*.dist" -exec chmod -x {} \; +find mapscript/ -type f "(" -iname "*.p[ly]" -o -iname "*.rb" -o -iname "*.dist" ")" -exec chmod -x {} + cd build %make_install cd .. +%if 0%{?with php} mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/ cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscript.ini <