f0470d5
#
f0470d5
Name:           travelccm
9b3881f
Version:        1.00.9
712653c
Release:        %autorelease
f0470d5
f0470d5
Summary:        C++ Travel Customer Choice Model (CCM) Library
f0470d5
712653c
License:        LGPL-2.1-or-later
e6ab394
URL:            https://github.com/airsim/%{name}
712653c
Source0:        %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
f0470d5
Igor Gnatenko 44661ab
BuildRequires:  gcc-c++
a211ca5
BuildRequires:  cmake
a211ca5
BuildRequires:  boost-devel
a211ca5
BuildRequires:  soci-mysql-devel
a211ca5
BuildRequires:  soci-sqlite3-devel
712653c
BuildRequires:  pkgconfig(readline)
712653c
BuildRequires:  pkgconfig(stdair)
f0470d5
f0470d5
%description
f0470d5
%{name} aims at providing a clean API, and the corresponding
f0470d5
C++ implementation, for choosing one item among a set of travel
f0470d5
solutions, given demand-related characteristics (e.g.,
f0470d5
Willingness-To-Pay, preferred airline, preferred cabin, etc.).
f0470d5
f0470d5
The %{name} C++ library implements some simple Customer Choice Models
f0470d5
(CCM), as referenced in the literature (PhD dissertations at MIT, for
e6ab394
instance: https://dspace.mit.edu).
f0470d5
f0470d5
The %{name} C++ library exposes a simple, clean and object-oriented,
f0470d5
API. For instance, the choose() method takes, as input, both a
f0470d5
structure representing the travel request (e.g., "from Washington, DC,
f0470d5
US, to Beijing, China, on the 25th of May") and a list of travel
e6ab394
solutions (as provided by the Airline Travel Solution Provider (AirTSP)
e6ab394
project: https://github.com/airsim/airtsp), and yields, as output, the
f0470d5
chosen item.
f0470d5
f0470d5
The output can then be used by other systems, for instance to book the
f0470d5
corresponding travel or to visualize it on a map and calendar and to
f0470d5
share it with others.
f0470d5
f0470d5
%{name} makes an extensive use of existing open-source libraries for
f0470d5
increased functionality, speed and accuracy. In particular the
e6ab394
Boost (C++ Standard Extensions: https://www.boost.org) library is used.
f0470d5
f0470d5
Install the %{name} package if you need a library of basic C++ objects
f0470d5
for Customer-Choice Modeling (CCM), mainly for simulation purpose.
f0470d5
f0470d5
%package        devel
f0470d5
Summary:        Header files, libraries and development helper tools for %{name}
f0470d5
Requires:       %{name}%{?_isa} = %{version}-%{release}
f0470d5
Requires:       pkgconfig
f0470d5
f0470d5
%description    devel
f0470d5
This package contains the header files, shared libraries and
f0470d5
development helper tools for %{name}. If you would like to develop
f0470d5
programs using %{name}, you will need to install %{name}-devel.
f0470d5
f0470d5
%package        doc
f0470d5
Summary:        HTML documentation for the %{name} library
f0470d5
BuildArch:      noarch
f0470d5
BuildRequires:  tex(latex)
e6ab394
BuildRequires:  texlive-epstopdf
e6ab394
BuildRequires:  doxygen
e6ab394
BuildRequires:  ghostscript
f0470d5
f0470d5
%description    doc
f0470d5
This package contains HTML pages, as well as a PDF reference manual,
f0470d5
for %{name}. All that documentation is generated thanks to Doxygen
712653c
(https://doxygen.org). The content is the same as what can be browsed
712653c
online (https://github.com/airsim/%{name}).
f0470d5
f0470d5
f0470d5
%prep
712653c
%autosetup
f0470d5
f0470d5
%build
da8b1bd
%cmake
da8b1bd
%cmake_build
f0470d5
f0470d5
%install
da8b1bd
%cmake_install
f0470d5
efa8dde
# Remove the installer generated by Doxygen
efa8dde
rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}/html/installdox
f0470d5
Petr Machata 25b59a9
# Remove additional documentation files (those files are already available
Petr Machata 25b59a9
# in the project top directory)
a211ca5
rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}/{NEWS,README.md,AUTHORS}
Petr Machata 25b59a9
f0470d5
%check
da8b1bd
%ctest
f0470d5
f0470d5
f0470d5
%files
da8b1bd
%license COPYING
da8b1bd
%doc AUTHORS ChangeLog NEWS README.md
f0470d5
%{_bindir}/%{name}
f0470d5
%{_libdir}/lib%{name}.so.*
f0470d5
%{_mandir}/man1/%{name}.1.*
f0470d5
f0470d5
%files devel
712653c
%{_includedir}/%{name}/
f0470d5
%{_bindir}/%{name}-config
f0470d5
%{_libdir}/lib%{name}.so
f0470d5
%{_libdir}/pkgconfig/%{name}.pc
f0470d5
%{_datadir}/aclocal/%{name}.m4
f0470d5
%dir %{_datadir}/%{name}
712653c
%{_datadir}/%{name}/CMake/
f0470d5
%{_mandir}/man1/%{name}-config.1.*
f0470d5
%{_mandir}/man3/%{name}-library.3.*
f0470d5
f0470d5
%files doc
712653c
%doc %{_docdir}/%{name}/
712653c
%license COPYING
f0470d5
f0470d5
f0470d5
%changelog
12556c5
%autochangelog
52ab81e