File mapcache.spec of Package mapcache

#
# spec file for package mapcache
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define realname mapcache
%define apr %{_bindir}/apr-1-config
%define apu %{_bindir}/apu-1-config
%define apache apache2
%define github_version rel-1-2-1
Name:           %{realname}
Version:        1.10.0
Release:        0
Summary:        Apache2 module to restrict bandwidth
License:        BSD-2-Clause
Group:          Productivity/Networking/Web/Servers
URL:            http://www.mapserver.org/trunk/mapcache/install.html
Source0:        http://download.osgeo.org/mapserver/%{realname}-%{version}.tar.gz
Patch0:         mapcache-cmake_fixx-1.1.patch
BuildRequires:  FastCGI-devel
BuildRequires:  apache2-devel
BuildRequires:  apache-rpm-macros
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libapr-util1-devel
BuildRequires:  libapr1-devel
BuildRequires:  libcurl-devel
BuildRequires:  libdb-4_8-devel
BuildRequires:  libexpat-devel
BuildRequires:  gdal-devel
BuildRequires:  libgeos-devel
BuildRequires:  libgeotiff-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpixman-1-0-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  pcre-devel
BuildRequires:  postgresql-devel
BuildRequires:  sqlite-devel
Requires:       %{apache_mmn}
Requires:       %{apache_suse_maintenance_mmn}
Requires:       apache2

%description
MapCache is a high performance tiling server, that runs in native code either as a FastCGI,
an Apache module, or an Nginx module. It supports a wide variety of protocols
(WMTS, TMS, WMS, VirtualEarth, KML, ...) and storage backends (Disk, SQlite, Memcache, GeoTIFF files, BerkeleyBD, ...)
and provides options for dynamically responding to client requests by assembling cached tiles.

%prep
%setup -q
%patch0 -p1

%build
# FIXME: you should use the %%cmake macros
cmake -DWITH_TIFF=1 -DWITH_GEOTIFF=1 \
-DWITH_BERKELEY_DB=0 -DWITH_PCRE=1 -DFCGI_INCLUDE_DIR=%{_includedir}/fastcgi \
-DCMAKE_INSTALL_PREFIX=%{_prefix}

%make_build

%install
%make_install

%files
%{_bindir}/mapcache.fcgi
%{_bindir}/mapcache_seed
%{_bindir}/mapcache_detail
%{_libdir}/libmapcache.so*
%license LICENSE
%doc README.rst
%{apache_libexecdir}/*.so

%changelog
openSUSE Build Service is sponsored by