File pgRouting.spec of Package pgRouting
#
# spec file for package pgRouting
#
# Copyright (c) 2024 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 pg_name @BUILD_FLAVOR@%{nil}
%define ext_name pgRouting
%define main_version 3.8
%define soname 3_8
%define libname librouting-%{soname}
Name: %{pg_name}-%{ext_name}
Version: 3.8.0
Release: 0
Summary: Extension pgRouting bring routing on PostGIS/PostgreSQL geospatial database
License: GPL-2.0-or-later
Group: Productivity/Databases/Servers
URL: https://pgrouting.org/
Source: https://github.com/pgRouting/pgrouting/archive/v%{version}.tar.gz#/%{ext_name}-%{version}.tar.gz
BuildRequires: %{pg_name}-llvmjit-devel
BuildRequires: %{pg_name}-server-devel
BuildRequires: cmake >= 3.2
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libboost_graph-devel
BuildRequires: libboost_headers-devel
BuildRequires: libboost_thread-devel
BuildRequires: libjson-c-devel
BuildRequires: update-alternatives
Requires: %{pg_name}-postgis
Provides: pgRouting
Provides: %{pg_name}-pgrouting
%{pg_version_from_name}
%{pg_server_requires}
%if "%{pg_name}" == ""
ExclusiveArch: do_not_build
%endif
%description
pgRouting extends the PostGIS / PostgreSQL geospatial database to
provide geospatial routing functionality.
Advantages of the database routing approach are:
Data and attributes can be modified by many clients, like QGIS and
uDig through JDBC, ODBC, or directly using Pl/pgSQL. The clients can
either be PCs or mobile devices.
Data changes can be reflected instantaneously through the routing
engine. There is no need for precalculation.
The “cost” parameter can be dynamically calculated through SQL and
its value can come from multiple fields or tables.
Core Features
pgRouting library contains following features:
All Pairs Shortest Path, Johnson’s Algorithm
All Pairs Shortest Path, Floyd-Warshall Algorithm
Shortest Path A*
Bi-directional Dijkstra Shortest Path
Bi-directional A* Shortest Path
Shortest Path Dijkstra
Driving Distance
K-Shortest Path, Multiple Alternative Paths
K-Dijkstra, One to Many Shortest Path
Traveling Sales Person
Turn Restriction Shortest Path (TRSP)
Learn more about using pgRouting in your application by reading
the documentation.
pgRouting is Open Source
pgRouting is available under the GPLv2 license and is supported by a
growing community of individuals, businesses and organizations.
%prep
%setup -q -n pgrouting-%{version}
%build
# with %%cmake macro we have to remove the
# -Wl,--no-undefined
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
..
%make_build
%install
install -d -m 755 %{buildroot}%{pg_config_libdir}
make -C build install DESTDIR=%{buildroot}
%fdupes -s %{buildroot}%{pg_config_sharedir}/extension
%fdupes -s %{buildroot}%{pg_config_sharedir}/contrib
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license LICENSE BOOST_LICENSE_1_0.txt
%doc README.md NEWS CONTRIBUTING.md CODE_OF_CONDUCT.md
%{pg_config_pkglibdir}/*
%{pg_config_sharedir}/extension/*
%changelog