From ac9e63630cdc8aa4f8316079168c3cffa75a7c1b Mon Sep 17 00:00:00 2001 From: Denis Arnaud Date: Thu, 21 Feb 2019 13:35:01 +0100 Subject: [PATCH 1/5] Specific license tag, no glob for libraries Took into account feedback of BZ#866265 --- .gitignore | 10 ++ opentrep.spec | 282 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 293 insertions(+) create mode 100644 .gitignore create mode 100644 opentrep.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567fb8d --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +opentrep-*.tar.* +opentrep-*.zip +opentrep-*.src.rpm +.gitignore +clog +.build-* +/opentrep-3.?.? +/noarch +/x86_64 +/tarballs/ diff --git a/opentrep.spec b/opentrep.spec new file mode 100644 index 0000000..35f2a23 --- /dev/null +++ b/opentrep.spec @@ -0,0 +1,282 @@ +# +%global mydocs __tmp_docdir + +# Build -python subpackage +%bcond_without python + +# See also http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Private_Libraries +%if %{with python} +%global _privatelibs libpy%{name}[.]so.* +%global __provides_exclude ^(%{_privatelibs})$ +%global __requires_exclude ^(%{_privatelibs})$ +%endif + +# +Name: opentrep +Version: 0.07.1 +Release: 2%{?dist} + +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: LGPLv2+ and BSD +URL: http://github.com/trep/%{name} +Source0: %{url}/archive/%{name}-%{version}.tar.gz + +Requires: %{name}-data = %{version}-%{release} + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: python3-devel +BuildRequires: boost-devel +BuildRequires: boost-python3-devel +BuildRequires: readline-devel +BuildRequires: soci-mysql-devel +BuildRequires: soci-sqlite3-devel +BuildRequires: xapian-core-devel +BuildRequires: sqlite-devel +BuildRequires: mariadb-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 http://search-travel.org Web site. + +%{name} uses Xapian (http://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 (http://github.com/opentraveldata/opentraveldata): +http://github.com/opentraveldata/opentraveldata/tree/trunk/opentraveldata + +%{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: http://www.boost.org) and +SOCI (http://soci.sourceforge.net) libraries are used. + +Note that %{name} currently only recognizes points of reference (POR), +as to be found in the following file: http://bit.ly/1DXIjWE +A good complementary tool is GeoBase (http://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. + +%package data +Summary: Referential data for the %{name} library +Group: Applications/Databases +License: CC-BY-SA +BuildArch: noarch + +%description data +OpenTREP uses Xapian (http://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 (http://github.com/opentraveldata/opentraveldata): +http://github.com/opentraveldata/opentraveldata/tree/trunk/opentraveldata + + +%package doc +Summary: HTML documentation for the %{name} library +Group: Documentation +BuildArch: noarch +BuildRequires: tex(latex), tex(sectsty.sty), tex(tocloft.sty), tex(xtab.sty) +BuildRequires: texlive-collection-langcyrillic, texlive-cyrillic +BuildRequires: doxygen +BuildRequires: ghostscript + +%description doc +This package contains HTML pages for %{name}. All that documentation +is generated thanks to Doxygen (http://doxygen.org). The content is +the same as what can be browsed online (http://opentrep.sourceforge.net). +Note that the PDF form of the reference manual is mainly available online +(http://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. + +%if %{with python} +%package -n python3-%{name} +Summary: Python bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-protobuf +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +This package contains Python libraries for %{name} +%endif + + +%prep +%setup -q -n %{name}-%{name}-%{version} + + +%build +%cmake . +%make_build + +%install +%make_install + +# From rpm version > 4.9.1, it may no longer be necessary to move the +# documentation out of the docdir path, as the %%doc macro no longer +# deletes the full directory before installing files into it. +mkdir -p %{mydocs} +mv %{buildroot}%{_docdir}/%{name}/html %{mydocs} +rm -f %{mydocs}/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 +install -d %{buildroot}%{python3_sitearch}/py%{name} +install -pm 0755 %{buildroot}%{_bindir}/py%{name} %{buildroot}%{python3_sitearch}/py%{name}/ +rm -f %{buildroot}%{_bindir}/py%{name} +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 +%license COPYING +%doc AUTHORS ChangeLog NEWS README.md +%{_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/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/optd_por_public_4_test.csv +%{_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 data +%doc %{_datadir}/%{name}/data/por/README.md +%{_datadir}/%{name}/data/por/optd_por_public.csv + +%files doc +%doc %{mydocs}/html +%license COPYING + +%if %{with python} +%files -n python3-%{name} +#%%{_bindir}/py%%{name} +%{python3_sitearch}/py%{name}/ +%{_mandir}/man1/py%{name}.1.* +%endif + + +%changelog +* Sun Feb 17 2019 Denis Arnaud 0.07.1-2 +- Specific license tag, no glob for libraries +- Took into account feedback of BZ#866265 + +* Wed Jan 16 2019 Denis Arnaud 0.07.1-1 +- Upstream update + +* Tue Oct 16 2018 Denis Arnaud 0.07.0-1 +- Upstream update + +* Sun Apr 19 2015 Denis Arnaud 0.6.6-1 +- Upstream update + +* Sun Apr 19 2015 Denis Arnaud 0.6.5-1 +- Upstream update + +* Sun Apr 13 2014 Denis Arnaud 0.6.1-1 +- Upstream update +- The Python-related files are now packaged within a dedicated sub-package + +* Sun Feb 02 2014 Denis Arnaud 0.6.0-1 +- Upstream update + +* Mon Aug 12 2013 Denis Arnaud - 0.5.3-3 +- Took into account a part of the feedbacks from review request (BZ#866265): + opentrep-config now supports multilib (32 and 64bit versions). +- Upstream update + +* Mon Jul 29 2013 Denis Arnaud - 0.5.3-2 +- Fixed the docdir issue, following the F20 System Wide Change +- Rebuild for boost 1.54.0 + +* Sun Mar 10 2013 Denis Arnaud 0.5.3-1 +- Upstream update + +* Sun Feb 17 2013 Denis Arnaud 0.5.2-1 +- Upstream update + +* Thu Oct 25 2012 Denis Arnaud 0.5.0-2 +- Took into account review request #866265 feedback + +* Sun Oct 14 2012 Denis Arnaud 0.5.0-1 +- Upstream update + +* Tue Nov 01 2011 Denis Arnaud 0.4.0-1 +- The build system is now based on CMake (instead of the GNU Autotools) + +* Sun Mar 29 2009 Denis Arnaud 0.3.0-1 +- Now relies on the new SOCI RPM + +* Sun Mar 22 2009 Denis Arnaud 0.2.0-1 +- RPM release for Fedora 10 + diff --git a/sources b/sources new file mode 100644 index 0000000..08036bc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (opentrep-0.07.1.tar.gz) = 4910936b5bb808de2a235bdadf4127b2fdd401fa095e73655f8ec83863ffd591adf23b6605fe62786c1e2d42a7c361a9f2c243b021e34e1a9506bdd02bdd4d3d From ae78b2884e8cd971f6d049b73d4cca5737268e61 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 23:37:20 +0000 Subject: [PATCH 2/5] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- opentrep.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opentrep.spec b/opentrep.spec index 35f2a23..dab44a3 100644 --- a/opentrep.spec +++ b/opentrep.spec @@ -14,7 +14,7 @@ # Name: opentrep Version: 0.07.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ library providing a clean API for parsing travel-focused requests @@ -227,6 +227,9 @@ rm -f %{_bindir}/py%{name} %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 0.07.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 17 2019 Denis Arnaud 0.07.1-2 - Specific license tag, no glob for libraries - Took into account feedback of BZ#866265 From bddf3c3cbeb265a59be194029b20e98494f23131 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 13 Aug 2019 12:11:15 +0200 Subject: [PATCH 3/5] Drop obsolete Group tag Signed-off-by: Igor Gnatenko --- opentrep.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opentrep.spec b/opentrep.spec index dab44a3..1f22e66 100644 --- a/opentrep.spec +++ b/opentrep.spec @@ -93,7 +93,6 @@ programs using %{name}, you will need to install %{name}-devel. %package data Summary: Referential data for the %{name} library -Group: Applications/Databases License: CC-BY-SA BuildArch: noarch @@ -107,7 +106,6 @@ http://github.com/opentraveldata/opentraveldata/tree/trunk/opentraveldata %package doc Summary: HTML documentation for the %{name} library -Group: Documentation BuildArch: noarch BuildRequires: tex(latex), tex(sectsty.sty), tex(tocloft.sty), tex(xtab.sty) BuildRequires: texlive-collection-langcyrillic, texlive-cyrillic From cc789952368d49e608245364d346cce2b2ef9516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 10:21:26 +0200 Subject: [PATCH 4/5] Rebuilt for Python 3.8 --- opentrep.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opentrep.spec b/opentrep.spec index 1f22e66..7251681 100644 --- a/opentrep.spec +++ b/opentrep.spec @@ -14,7 +14,7 @@ # Name: opentrep Version: 0.07.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ library providing a clean API for parsing travel-focused requests @@ -225,6 +225,9 @@ rm -f %{_bindir}/py%{name} %changelog +* Mon Aug 19 2019 Miro Hrončok - 0.07.1-4 +- Rebuilt for Python 3.8 + * Thu Jul 25 2019 Fedora Release Engineering - 0.07.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From baddbb8b60d574b4204ea8f8380f3cd900f2137a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 3 Oct 2019 13:57:52 +0200 Subject: [PATCH 5/5] Rebuilt for Python 3.8.0rc1 (#1748018) --- opentrep.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opentrep.spec b/opentrep.spec index 7251681..0902986 100644 --- a/opentrep.spec +++ b/opentrep.spec @@ -14,7 +14,7 @@ # Name: opentrep Version: 0.07.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: C++ library providing a clean API for parsing travel-focused requests @@ -225,6 +225,9 @@ rm -f %{_bindir}/py%{name} %changelog +* Thu Oct 03 2019 Miro Hrončok - 0.07.1-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + * Mon Aug 19 2019 Miro Hrončok - 0.07.1-4 - Rebuilt for Python 3.8