File tinyows.spec of Package tinyows

# spec file for package tinyows
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2020 Ioda-Net Sàrl, Charmoille, Switzerland. Bruno Friedmann (tigerfoot)
# 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

%define _cgibindir /srv/www/cgi-bin
Name:           tinyows
Version:        1.1.1
Release:        0
Summary:        A simple WFS-T server based on PostGIS spatial database
License:        MIT
Group:          Productivity/Networking/Web/Servers
BuildRequires:  FastCGI-devel
BuildRequires:  autoconf
BuildRequires:  chrpath
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  graphviz
BuildRequires:  graphviz-gd
BuildRequires:  hdf5-devel >= 1.8.11
BuildRequires:  libtool
BuildRequires:  pkgconfig
# TW or Leap 15.2
%if (0%{?suse_version} >= 1550 ) || ( 0%{?sle_version} >= 150200 && 0%{?is_opensuse} == 1 )
BuildRequires:  postgresql12-server-devel
# You need that to satisfy postgresql-server-implementation
# otherwise you get postgresql10 installed
BuildRequires:  postgresql12-server
BuildRequires:  postgresql12-postgis
BuildRequires:  postgresql10-devel
BuildRequires:  postgresql10-postgis
BuildRequires:  xz
BuildRequires:  pkgconfig(libxml-2.0)
Requires:       FastCGI
Requires:       flex
Requires:       libxml2 >= 2.7.0
Requires:       pkgconfig(libpq)

%package doc
Summary:        Documentation & demos for TinyOWS
Group:          Productivity/Networking/Web/Servers

TinyOWS was written with the following things in mind:
- KISS approach !
- As OGC standard compliant as possible, aiming to support:
   - WFS (1.0 and 1.1)
   - FE (1.0 and 1.1)
- Performance is a matter, maps are cool as they're quick to display
- Clean source code
TinyOWS is part of the mapserver suite.

Code quality policy:
All code must meet the following rules :
- gcc -c99 -pedantic -Wall compile without any warning (make)
- Unit test with Valgrind error and leak free (make valgrind)
- Pass trought OGC CITE WFS-T tests (1.0.0 and 1.1.0 SF-0)

Code dynamically linked with the following other librairies:
 - PostgreSQL 9.x
 - libxml 2.8.x
 - flex

%description doc
TinyOWS WFS-T server this package contain doc and demo

%setup -q -n %{name}-v.%{version}
%patch0 -p1


%configure \
 --with-xml2-config=%{_bindir}/xml2-config \
 --with-pg_config=$(pg_config --bindir)/pg_config \
 --with-shp2pgsql=$(pg_config --bindir)/shp2pgsql \
 --with-fastcgi=%{_prefix} \

make %{?_smp_mflags} VERBOSE=1 flex

make VERBOSE=1 %{?_smp_mflags}

# Make doxygen documentation
# make doxygen

mkdir -p %{buildroot}/%{_cgibindir}
install -p -m 755 tinyows %{buildroot}/%{_cgibindir}

mkdir -p %{buildroot}/%{_datadir}/%{name}/schema
cp -rf schema %{buildroot}/%{_datadir}/%{name}/

%fdupes -s %{buildroot}/%{_datadir}/%{name}/

# make valgrind

%license LICENSE

%files doc
%doc demo

openSUSE Build Service is sponsored by