## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Build -pythonN subpackage %bcond_without python # Name: opentrep Version: 0.07.16 Release: %autorelease Summary: C++ library providing a clean API for parsing travel-focused requests # The entire source code is LGPLv2+ except opentrep/basic/float_utils_google.hpp, # which is BSD License: LGPL-2.1-or-later URL: https://github.com/trep/%{name} Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: boost-devel BuildRequires: pkgconfig(readline) BuildRequires: soci-mysql-devel BuildRequires: soci-sqlite3-devel BuildRequires: xapian-core-devel BuildRequires: mysql-devel BuildRequires: sqlite-devel BuildRequires: libicu-devel BuildRequires: protobuf-devel BuildRequires: protobuf-compiler %description %{name} aims at providing a clean API, and the corresponding C++ implementation, for parsing travel-focused requests. It powers the https://transport-search.org Web site. %{name} uses Xapian (https://www.xapian.org) for the Information Retrieval part, on freely available travel-related data (e.g., country names and codes, city names and codes, airline names and codes, etc.), mainly to be found in the OpenTravelData project (https://github.com/opentraveldata/opentraveldata). The data files are available from https://transport-search.org/data/optd/por/ %{name} exposes a simple, clean and object-oriented, API. For instance, the OPENTREP::interpretTravelRequest() method takes, as input, a string containing the travel request, and yields, as output, the list of the recognized terms as well as their corresponding types. As an example, the travel request 'Washington DC Beijing Monday a/r +AA -UA 1 week 2 adults 1 dog' would give the following list: * Origin airport: Washington, DC, USA * Destination airport: Beijing, China * Date of travel: next Monday * Date of return: 1 week after next Monday * Preferred airline: American Airlines; non-preferred airline: United Airlines * Number of travelers: 2 adults and a dog The output can then be used by other systems, for instance to book the corresponding travel or to visualize it on a map and calendar and to share it with others. %{name} makes an extensive use of existing open-source libraries for increased functionality, speed and accuracy. In particular the Boost (C++ Standard Extensions: https://www.boost.org) and SOCI (https://github.com/SOCI) libraries are used. Note that %{name} currently only recognizes points of reference (POR), as to be found in the following file: https://bit.ly/3fQaddv A good complementary tool is GeoBase (https://opentraveldata.github.io/geobases), a Python-based software able to access to any travel-related data source. %package devel Summary: Header files, libraries and development helper tools for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel This package contains the header files, shared libraries and development helper tools for %{name}. If you would like to develop programs using %{name}, you will need to install %{name}-devel. %if %{with python} %package -n python3-%{name} Summary: Python bindings for %{name} Group: System Environment/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: boost-python3-devel %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} This package contains Python libraries for %{name} %endif %package doc Summary: HTML documentation for the %{name} library BuildArch: noarch BuildRequires: tex(latex), tex(sectsty.sty), tex(tocloft.sty), tex(xtab.sty) BuildRequires: texlive-epstopdf BuildRequires: doxygen BuildRequires: ghostscript %description doc This package contains HTML pages for %{name}. All that documentation is generated thanks to Doxygen (https://doxygen.org). The content is the same as what can be browsed online (https://opentrep.sourceforge.net). Note that the PDF form of the reference manual is mainly available online (https://opentrep.sourceforge.net/refman.pdf), as the one present in that package is usually corrupted: it depends on the building conditions, and it is therefore not reliable. %prep %autosetup %build %cmake %cmake_build %install %cmake_install # Remove the Doxygen installer rm -f %{buildroot}%{_docdir}/%{name}/html/installdox # Remove additional documentation files (those files are already available # in the project top directory) rm -f %{buildroot}%{_docdir}/%{name}/{NEWS,README.md,AUTHORS} %if %{with python} # (Pure) Python OpenTREP executable chmod a-x %{buildroot}%{python3_sitearch}/py%{name}/Travel_pb2.py %endif #check #ctest %if %{with python} %post -n python3-%{name} ln -s -f %{python3_sitearch}/py%{name}/py%{name} %{_bindir}/py%{name} %postun -n python3-%{name} rm -f %{_bindir}/py%{name} %endif %files %doc AUTHORS ChangeLog NEWS README.md %license COPYING %{_bindir}/%{name}-indexer %{_bindir}/%{name}-searcher %{_bindir}/%{name}-dbmgr %{_libdir}/lib%{name}.so.0.* %{_mandir}/man1/%{name}-indexer.1.* %{_mandir}/man1/%{name}-searcher.1.* %{_mandir}/man1/%{name}-dbmgr.1.* %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/data %dir %{_datadir}/%{name}/data/por %{_datadir}/%{name}/data/por/README.md %{_datadir}/%{name}/data/por/create_trep_user_and_db.sql %{_datadir}/%{name}/data/por/create_trep_tables_sqlite3.sql %{_datadir}/%{name}/data/por/create_trep_tables_mysql.sql %{_datadir}/%{name}/data/por/test_optd_por_public.csv %{_datadir}/%{name}/data/por/test_optd_por_public_schema.sql %{_datadir}/%{name}/data/por/test_world_schedule.csv %files devel %{_includedir}/%{name}/ %{_bindir}/%{name}-config %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_datadir}/aclocal/%{name}.m4 %{_datadir}/%{name}/CMake/ %{_mandir}/man1/%{name}-config.1.* %{_mandir}/man3/%{name}-library.3.* %files doc %doc %{_docdir}/%{name}/ %license COPYING %if %{with python} %files -n python3-%{name} %{python3_sitearch}/py%{name}/ %{_mandir}/man1/py%{name}.1.* %endif %changelog ## START: Generated by rpmautospec * Wed Nov 20 2024 Denis Arnaud - 0.07.16-1 - Upstream upgrade * Thu Jul 18 2024 Fedora Release Engineering - 0.07.15-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 0.07.15-6 - Rebuilt for Python 3.13 * Sat Mar 23 2024 Denis Arnaud - 0.07.15-5 - Modernized the spec file * Sat Mar 23 2024 Denis Arnaud - 0.07.15-4 - Upstream upgrade * Sat Mar 23 2024 Denis Arnaud - 0.07.15-3 - Upstream upgrade * Sat Mar 23 2024 Denis Arnaud - 0.07.15-2 - Upstream upgrade * Sat Mar 23 2024 Denis Arnaud - 0.07.15-1 - Upstream upgrade * Wed Jan 31 2024 Pete Walter - 0.07.13-9 - Rebuild for ICU 74 * Thu Jan 25 2024 Fedora Release Engineering - 0.07.13-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.07.13-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 18 2024 Jonathan Wakely - 0.07.13-6 - Rebuilt for Boost 1.83 * Tue Nov 21 2023 Karolina Surma - 0.07.13-5 - Add Python 3.13 to cmake config * Thu Jul 20 2023 Fedora Release Engineering - 0.07.13-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 11 2023 František Zatloukal - 0.07.13-3 - Rebuilt for ICU 73.2 * Tue Jun 13 2023 Python Maint - 0.07.13-2 - Rebuilt for Python 3.12 * Mon May 01 2023 Denis Arnaud - 0.07.13-1 - Upstream upgrade * Mon Feb 20 2023 Jonathan Wakely - 0.07.11-6 - Rebuilt for Boost 1.81 * Thu Jan 19 2023 Fedora Release Engineering - 0.07.11-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Dec 31 2022 Pete Walter - 0.07.11-4 - Rebuild for ICU 72 * Mon Aug 01 2022 František Zatloukal - 0.07.11-3 - Rebuilt for ICU 71.1 * Fri Jul 22 2022 Fedora Release Engineering - 0.07.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sun Jul 10 2022 Denis Arnaud - 0.07.11-1 - Upgraded to v0.07.11 * Mon Jun 13 2022 Python Maint - 0.07.10-5 - Rebuilt for Python 3.11 * Wed May 04 2022 Thomas Rodgers - 0.07.10-4 - Rebuilt for Boost 1.78 * Fri Jan 28 2022 Troy Dawson - 0.07.10-3 - Remove package.cfg; Part of epel8-playground decommission * Thu Jan 20 2022 Fedora Release Engineering - 0.07.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Nov 14 2021 Denis Arnaud - 0.07.10-1 - Upstream update * Sun Nov 07 2021 Mamoru TASAKA - 0.07.9-7 - Upstream patch to build with boost 1.76 * Tue Oct 26 2021 Adrian Reber - 0.07.9-6 - Rebuilt for protobuf 3.18.1 * Sat Aug 07 2021 Jonathan Wakely - 0.07.9-5 - Rebuilt for Boost 1.76 * Thu Jul 22 2021 Fedora Release Engineering - 0.07.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sat Jun 26 2021 Denis Arnaud - 0.07.9-3 - Fixed the naming issue * Sat Jun 26 2021 Denis Arnaud - 0.07.9-2 - New opentrep-0.07.9.tar.gz source * Sat Jun 26 2021 Denis Arnaud - 0.07.9-1 - Upstream upgrade * Fri Jun 04 2021 Python Maint - 0.07.7-15 - Rebuilt for Python 3.10 * Thu May 20 2021 Pete Walter - 0.07.7-14 - Rebuild for ICU 69 * Tue Jan 26 2021 Fedora Release Engineering - 0.07.7-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Jan 25 2021 Honza Horak - 0.07.7-12 - Use correct name for the mariadb package * Fri Jan 22 2021 Jonathan Wakely - 0.07.7-11 - Rebuilt for Boost 1.75 * Wed Jan 13 2021 Adrian Reber - 0.07.7-10 - Rebuilt for protobuf 3.14 * Thu Sep 24 2020 Adrian Reber - 0.07.7-9 - Rebuilt for protobuf 3.13 * Sun Aug 09 2020 Denis Arnaud - 0.07.7-8 - Removed the docdir work around (no longer needed) * Tue Aug 04 2020 Denis Arnaud - 0.07.7-7 - CMake build out of source. Fixes BZ#1865172 * Sat Aug 01 2020 Fedora Release Engineering - 0.07.7-6 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.07.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun Jun 21 2020 Adrian Reber - 0.07.7-4 - Rebuilt for protobuf 3.12 * Tue Jun 16 2020 Denis Arnaud - 0.07.7-3 - Rebuilt for library dependency inconsistency * Sun Jun 07 2020 Denis Arnaud - 0.07.7-2 - Rebuilt for SOCI 4.0.1-alpha2 * Mon Jun 01 2020 Denis Arnaud - 0.07.7-1 - Upstream update * Sat May 30 2020 Jonathan Wakely - 0.07.4-18 - Rebuilt for Boost 1.73 * Tue May 26 2020 Miro Hrončok - 0.07.4-17 - Rebuilt for Python 3.9 * Wed Jan 29 2020 Fedora Release Engineering - 0.07.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Dec 19 2019 Orion Poplawski - 0.07.4-15 - Rebuild for protobuf 3.11 * Thu Nov 28 2019 Miro Hrončok - 0.07.4-14 - BR python3-setuptools explicitly * Sun Nov 24 2019 Denis Arnaud - 0.07.4-13 - Excluded ARMv7hl, as SOCI does not build on it * Sun Nov 24 2019 Denis Arnaud - 0.07.4-12 - Fixed a few typos in Pythn dependencies * Sun Nov 24 2019 Denis Arnaud - 0.07.4-11 - * Fixed a few typos in Python dependencies * Sun Nov 24 2019 Denis Arnaud - 0.07.4-10 - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec