- Make the package build on current Tumbleweed again
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/mapserver?expand=0&rev=127
This commit is contained in:
parent
11953a5530
commit
2371c1582a
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 9 12:06:56 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- 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 <boris@steki.net>
|
Thu Nov 11 16:38:03 UTC 2021 - Boris Manojlovic <boris@steki.net>
|
||||||
|
|
||||||
|
@ -18,16 +18,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_with php
|
||||||
|
%bcond_with postgres
|
||||||
%bcond_with ruby
|
%bcond_with ruby
|
||||||
|
|
||||||
#
|
|
||||||
%bcond_without python
|
%bcond_without python
|
||||||
%define libname libmapserver2
|
%define libname libmapserver2
|
||||||
%define _cgibindir /srv/www/cgi-bin
|
%define _cgibindir /srv/www/cgi-bin
|
||||||
%if 0%{?suse_version} >= 1500
|
%if 0%{?suse_version} >= 1550
|
||||||
%define php_name php7
|
%define php_name php8
|
||||||
%else
|
%else
|
||||||
%define php_name php5
|
%define php_name php7
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: mapserver
|
Name: mapserver
|
||||||
@ -69,10 +69,12 @@ BuildRequires: mysql-devel
|
|||||||
BuildRequires: openjpeg2-devel
|
BuildRequires: openjpeg2-devel
|
||||||
BuildRequires: pam
|
BuildRequires: pam
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
|
%if 0%{?with postgres}
|
||||||
BuildRequires: postgresql-devel >= 9.1
|
BuildRequires: postgresql-devel >= 9.1
|
||||||
%if 0%{?suse_version} >= 1500
|
%if 0%{?suse_version} >= 1500
|
||||||
BuildRequires: postgresql-server-devel >= 9.1
|
BuildRequires: postgresql-server-devel >= 9.1
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
BuildRequires: libprotobuf-c-devel
|
BuildRequires: libprotobuf-c-devel
|
||||||
BuildRequires: proj
|
BuildRequires: proj
|
||||||
BuildRequires: protobuf-c
|
BuildRequires: protobuf-c
|
||||||
@ -100,10 +102,8 @@ Group: System/Libraries
|
|||||||
Mapserver library for mapserver or mapscript module. you need this lib to run mapserver
|
Mapserver library for mapserver or mapscript module. you need this lib to run mapserver
|
||||||
or any of the mapscript module (php, java, python, ruby)
|
or any of the mapscript module (php, java, python, ruby)
|
||||||
|
|
||||||
|
# We don't require apache2_mod-php8 users could have php5 running
|
||||||
|
# with other modes (cgi, php-fpm, etc)
|
||||||
# We don't require apache2_mod-php5 users could have php5 running
|
|
||||||
# with other modes (cgi, php-fpm etc)
|
|
||||||
|
|
||||||
%package -n php-mapscript
|
%package -n php-mapscript
|
||||||
Summary: PHP/Mapscript map making extensions to PHP
|
Summary: PHP/Mapscript map making extensions to PHP
|
||||||
@ -112,7 +112,9 @@ Requires: %{libname} = %{version}-%{release}
|
|||||||
Requires: apache2
|
Requires: apache2
|
||||||
Provides: php-mapserver = %{version}-%{release}
|
Provides: php-mapserver = %{version}-%{release}
|
||||||
Obsoletes: php-mapserver < %{version}-%{release}
|
Obsoletes: php-mapserver < %{version}-%{release}
|
||||||
|
%if 0%{?with php}
|
||||||
BuildRequires: php-devel
|
BuildRequires: php-devel
|
||||||
|
%endif
|
||||||
Requires: php
|
Requires: php
|
||||||
Requires: php-gd
|
Requires: php-gd
|
||||||
|
|
||||||
@ -175,12 +177,13 @@ Obsoletes: mapserver-java < %{version}-%{release}
|
|||||||
The Java/Mapscript extension provides full map customization capabilities
|
The Java/Mapscript extension provides full map customization capabilities
|
||||||
within the Java programming language.
|
within the Java programming language.
|
||||||
|
|
||||||
%if %{with ruby}
|
|
||||||
%package -n ruby-mapscript
|
%package -n ruby-mapscript
|
||||||
Summary: Ruby/Mapscript map making extensions to Ruby
|
Summary: Ruby/Mapscript map making extensions to Ruby
|
||||||
Group: Development/Languages/Ruby
|
Group: Development/Languages/Ruby
|
||||||
|
%if %{with ruby}
|
||||||
BuildRequires: ruby-common
|
BuildRequires: ruby-common
|
||||||
BuildRequires: ruby-devel
|
BuildRequires: ruby-devel
|
||||||
|
%endif
|
||||||
Requires: %{libname} = %{version}-%{release}
|
Requires: %{libname} = %{version}-%{release}
|
||||||
Requires: ruby
|
Requires: ruby
|
||||||
Provides: mapserver-ruby = %{version}-%{release}
|
Provides: mapserver-ruby = %{version}-%{release}
|
||||||
@ -189,27 +192,28 @@ Obsoletes: mapserver-ruby < %{version}-%{release}
|
|||||||
%description -n ruby-mapscript
|
%description -n ruby-mapscript
|
||||||
The Ruby/Mapscript extension provides full map customization capabilities
|
The Ruby/Mapscript extension provides full map customization capabilities
|
||||||
within the Ruby programming language.
|
within the Ruby programming language.
|
||||||
%endif
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Mapserver development files
|
Summary: Mapserver development files
|
||||||
Group: Development/Libraries/Other
|
Group: Development/Libraries/Other
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{libname} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The Mapserver development package provides necessary files to build
|
The Mapserver development package provides necessary files to build
|
||||||
against the C Mapserver library.
|
against the C Mapserver library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%autosetup -p1
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
#Pre export the PREFIX ( having it on the command line doesn't expand correctly for
|
#Pre export the PREFIX ( having it on the command line doesn't expand correctly for
|
||||||
#dynamic postgresql location
|
#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 CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
|
|
||||||
@ -243,8 +247,12 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|||||||
-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%{?with php}
|
||||||
-DWITH_PHPNG=TRUE \
|
-DWITH_PHPNG=TRUE \
|
||||||
|
%endif
|
||||||
|
%if 0%{?with postgres}
|
||||||
-DWITH_POSTGIS=TRUE \
|
-DWITH_POSTGIS=TRUE \
|
||||||
|
%endif
|
||||||
-DWITH_PROJ=TRUE \
|
-DWITH_PROJ=TRUE \
|
||||||
-DUSE_PROJ=TRUE \
|
-DUSE_PROJ=TRUE \
|
||||||
-DWITH_PROTOBUFC=TRUE \
|
-DWITH_PROTOBUFC=TRUE \
|
||||||
@ -292,20 +300,20 @@ cp *.h %{buildroot}/%{_includedir}/%{name}/
|
|||||||
|
|
||||||
# fix some exec bits essentially on examples to make rpmlint happy
|
# fix some exec bits essentially on examples to make rpmlint happy
|
||||||
# and avoid rpm adding require
|
# and avoid rpm adding require
|
||||||
find ./mapscript/ -type f -iname "*.p[ly]" -exec chmod -x {} \;
|
find mapscript/ -type f "(" -iname "*.p[ly]" -o -iname "*.rb" -o -iname "*.dist" ")" -exec chmod -x {} +
|
||||||
find ./mapscript/ -type f -iname "*.rb" -exec chmod -x {} \;
|
|
||||||
find ./mapscript/ -type f -iname "*.dist" -exec chmod -x {} \;
|
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
%make_install
|
%make_install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
%if 0%{?with php}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/
|
mkdir -p %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/
|
||||||
cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscript.ini <<EOF
|
cat > %{buildroot}%{_sysconfdir}/%{php_name}/conf.d/mapscript.ini <<EOF
|
||||||
; Enable %{name} extension module
|
; Enable %{name} extension module
|
||||||
; For 6.4 we name the symlink here
|
; For 6.4 we name the symlink here
|
||||||
extension=php_mapscript.so
|
extension=php_mapscript.so
|
||||||
EOF
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
# Install our links
|
# Install our links
|
||||||
#@ todo : check
|
#@ todo : check
|
||||||
@ -317,8 +325,10 @@ ln -s %{_bindir}/scalebar %{buildroot}%{_cgibindir}/scalebar
|
|||||||
|
|
||||||
# remove vera fonts, these are provided system wide
|
# remove vera fonts, these are provided system wide
|
||||||
#@todo then we should patch the fonts file example
|
#@todo then we should patch the fonts file example
|
||||||
rm -rf %{buildroot}%{_docdir}/%{name}/tests/vera
|
rm -rf %{buildroot}%{_docdir}/%{name}/tests/vera \
|
||||||
rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/tests/vera
|
%{buildroot}%{_docdir}/%{name}-%{version}/tests/vera
|
||||||
|
|
||||||
|
chmod a+x "%{buildroot}/%{_libdir}/libjavamapscript.so"
|
||||||
|
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -346,12 +356,14 @@ rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/tests/vera
|
|||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%{_libdir}/libmapserver.so.*
|
%{_libdir}/libmapserver.so.*
|
||||||
|
|
||||||
|
%if 0%{?with php}
|
||||||
%files -n php-mapscript
|
%files -n php-mapscript
|
||||||
%doc mapscript/php/README
|
%doc mapscript/php/README
|
||||||
%doc mapscript/php/examples
|
%doc mapscript/php/examples
|
||||||
%config(noreplace) %{_sysconfdir}/%{php_name}/conf.d/mapscript.ini
|
%config(noreplace) %{_sysconfdir}/%{php_name}/conf.d/mapscript.ini
|
||||||
%{_libdir}/%{php_name}/extensions/mapscript.php
|
%{_libdir}/%{php_name}/extensions/mapscript.php
|
||||||
%{_libdir}/%{php_name}/extensions/php_mapscriptng.so*
|
%{_libdir}/%{php_name}/extensions/php_mapscriptng.so*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n perl-mapscript
|
%files -n perl-mapscript
|
||||||
%doc mapscript/perl/examples
|
%doc mapscript/perl/examples
|
||||||
@ -359,7 +371,7 @@ rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/tests/vera
|
|||||||
%{perl_vendorarch}/auto/mapscript/*
|
%{perl_vendorarch}/auto/mapscript/*
|
||||||
%{perl_vendorarch}/mapscript.pm
|
%{perl_vendorarch}/mapscript.pm
|
||||||
|
|
||||||
%if %{with python}
|
%if 0%{?with python}
|
||||||
%files -n python-mapscript
|
%files -n python-mapscript
|
||||||
%doc mapscript/python/README.rst
|
%doc mapscript/python/README.rst
|
||||||
%doc mapscript/python/examples
|
%doc mapscript/python/examples
|
||||||
|
Loading…
Reference in New Issue
Block a user