diff --git a/mapserver.spec b/mapserver.spec index 13c0db2..f3aefd9 100644 --- a/mapserver.spec +++ b/mapserver.spec @@ -19,9 +19,8 @@ %bcond_with php -%bcond_with postgres -%bcond_with ruby %bcond_without python +%bcond_with ruby %define libname libmapserver2 %define _cgibindir /srv/www/cgi-bin %if 0%{?suse_version} >= 1550 @@ -39,8 +38,12 @@ Group: Productivity/Networking/Web/Servers URL: https://www.mapserver.org/ Source: https://download.osgeo.org/mapserver/%{name}-%{version}.tar.gz Source9: %{name}-rpmlintrc +# Known issues: +# - /usr/share/cmake/Modules/FindPostgreSQL.cmake is silly +# (the postgresql version list is manual), so no postgresql +# - swig 4.0 can't do php8, gotta wait for 4.1 so no php # PATCH-FIX-UPSTREAM mapserver-7.6.1-fix_python_install_path.patch fixing python installation path badly defaulting to arch independent location -Patch0: mapserver-7.6.1-fix_python_install_path.patch +##Patch0: mapserver-7.6.1-fix_python_install_path.patch BuildRequires: FastCGI-devel BuildRequires: apache2-devel BuildRequires: autoconf @@ -69,11 +72,9 @@ BuildRequires: mysql-devel BuildRequires: openjpeg2-devel BuildRequires: pam BuildRequires: pam-devel -%if 0%{?with postgres} -BuildRequires: postgresql-devel >= 9.1 +#BuildRequires: postgresql-devel >= 9.1 %if 0%{?suse_version} >= 1500 -BuildRequires: postgresql-server-devel >= 9.1 -%endif +#BuildRequires: postgresql-server-devel >= 9.1 %endif BuildRequires: libprotobuf-c-devel BuildRequires: proj @@ -112,7 +113,7 @@ Requires: %{libname} = %{version}-%{release} Requires: apache2 Provides: php-mapserver = %{version}-%{release} Obsoletes: php-mapserver < %{version}-%{release} -%if 0%{?with php} +%if 0%{with php} BuildRequires: php-devel %endif Requires: php @@ -135,21 +136,14 @@ Obsoletes: mapserver-perl < %{version}-%{release} The Perl/Mapscript extension provides full map customization capabilities within the Perl programming language. -%if %{with python} %package -n python-mapscript Summary: Python/Mapscript map making extensions to Python Group: Development/Languages/Python -%if %{suse_version} >= 1500 -%define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") +%if 0%{with python} BuildRequires: python3-devel BuildRequires: python3-setuptools -Requires: python3-base -%else -%define python_sitearch %(python2 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") -BuildRequires: python2-devel -BuildRequires: python2-setuptools -Requires: python2-base %endif +Requires: python3-base Requires: %{libname} = %{version}-%{release} Provides: mapserver-python = %{version}-%{release} Obsoletes: mapserver-python < %{version}-%{release} @@ -157,7 +151,6 @@ Obsoletes: mapserver-python < %{version}-%{release} %description -n python-mapscript The Python/Mapscript extension provides full map customization capabilities within the Python programming language. -%endif %package -n libjavamapscript Summary: Java/Mapscript map making extensions to Java @@ -180,7 +173,7 @@ within the Java programming language. %package -n ruby-mapscript Summary: Ruby/Mapscript map making extensions to Ruby Group: Development/Languages/Ruby -%if %{with ruby} +%if 0%{with ruby} BuildRequires: ruby-common BuildRequires: ruby-devel %endif @@ -210,10 +203,7 @@ 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" -%if 0%{?with postgres} -export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:%%(pg_config --includedir):%%(pg_config --includedir-server):%%(pg_config --libdir)" -%endif +export CMAKE_PREFIX_PATH="%{_includedir}:%{_includedir}/fastcgi:%%(pg_config --includedir):%%(pg_config --includedir-server):%%(pg_config --libdir)" export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="%{optflags} -fno-strict-aliasing" @@ -247,19 +237,15 @@ 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_PHPNG=FALSE \ + -DWITH_POSTGIS=FALSE \ -DWITH_PROJ=TRUE \ -DUSE_PROJ=TRUE \ -DWITH_PROTOBUFC=TRUE \ -%if %{with python} +%if 0%{with python} -DWITH_PYTHON=TRUE \ %endif -%if %{with ruby} +%if 0%{with ruby} -DWITH_RUBY=TRUE \ %endif -DWITH_SOS=TRUE \ @@ -306,7 +292,7 @@ cd build %make_install cd .. -%if 0%{?with php} +%if 0%{with php} mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/ cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscript.ini <