File tinyows.spec of Package tinyows
#
# spec file for package tinyows
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 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 https://bugs.opensuse.org/
#
%define _cgibindir /srv/www/cgi-bin
Name: tinyows
Version: 1.2.0
Release: 0
Summary: A simple WFS-T server based on PostGIS spatial database
License: MIT
Group: Productivity/Networking/Web/Servers
URL: http://mapserver.org/tinyows/
Source: https://github.com/MapServer/tinyows/releases/download/v%{version}/%{name}-%{version}.tar.gz
#OPENSUSE Fix: remove dependency - not needed for build
Patch0: fix_shp2pgsql_dependency.patch
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: postgresql-server-devel
# You need that to satisfy postgresql-server-implementation
# otherwise you get postgresql10 installed
BuildRequires: postgresql-server
%else
BuildRequires: postgresql10-devel
%endif
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
BuildArch: noarch
%description
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
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%build
autoconf
%configure \
--with-xml2-config=%{_bindir}/xml2-config \
--with-pg_config=$(pg_config --bindir)/pg_config \
--without-shp2pgsql \
--with-fastcgi=%{_prefix} \
make %{?_smp_mflags} VERBOSE=1 flex
make VERBOSE=1 %{?_smp_mflags}
# Make doxygen documentation
# make doxygen
%install
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}/
rm -f demo/*.in
%fdupes -s demo/
%check
# make valgrind
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md NEWS
%{_cgibindir}/tinyows
%{_datadir}/%{name}/
%files doc
%defattr(-,root,root)
%doc demo
%changelog