File osrm-backend.spec of Package osrm-backend
#
# spec file for package osrm-backend
#
# Copyright (c) 2021 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 luavers 54
Name: osrm-backend
Version: 6.0.0
Release: 0
Summary: Open Source Routing Machine
License: BSD-2-Clause
Group: Productivity/Other
URL: https://project-osrm.org/
Source0: https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE remove guidance library building
Patch0: remove_guidance_library.patch
# PATCH-FIX-OPENSUSE adapt paths to openSUSE settings
Patch1: fix_library_install_dirs.patch
# PATCH-FIX-UPSTREAM Fix build with boost 1.89 https://github.com/Project-OSRM/osrm-backend/issues/7219
Patch2: a2e159d0d4f6b3922ee0cb058a800230cf90642e.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_iostreams-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_test-devel
BuildRequires: libboost_thread-devel
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
BuildRequires: lua%{luavers}-devel
BuildRequires: texlive-epstopdf-bin
BuildRequires: tbb-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Modern C++ routing engine for shortest paths in road networks.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%cmake
#TODO build doc
#TODO run unit tests
%if 0%{?sle_version} == 150000
%make_jobs
%else
%cmake_build
%endif
#build documentation
%__builder doc
%install
%cmake_install
%files
%defattr(-,root,root)
%{_bindir}/osrm-components
%{_bindir}/osrm-contract
%{_bindir}/osrm-customize
%{_bindir}/osrm-datastore
%{_bindir}/osrm-extract
%{_bindir}/osrm-io-benchmark
%{_bindir}/osrm-partition
%{_bindir}/osrm-routed
%{_libdir}/libosrm.so
%{_libdir}/libosrm_extract.so
%{_libdir}/libosrm_partition.so
%{_libdir}/libosrm_customize.so
%{_libdir}/libosrm_update.so
%{_libdir}/libosrm_contract.so
%{_libdir}/libosrm_store.so
%{_datadir}/osrm/
%doc
%package devel
Summary: Development files for osrm-backend
Requires: osrm-backend == %{version}
BuildRequires: pkg-config
Group: Development/Libraries/C and C++
%description devel
Development headers for building software which uses the c++ API for osrm-backend.
If only the REST API is used, this package is not needed.
%files devel
%defattr(644,root,root,-)
%{_includedir}/flatbuffers/
%{_includedir}/osrm/
#TODO: check that osrm_guidance isn't in here!
%{_libdir}/pkgconfig/libosrm.pc
%changelog