#
Name:           simfqt
Version:        1.00.6
Release:        2%{?dist}

Summary:        C++ Simulated Fare Quote System Library

License:        LGPLv2+
URL:            https://github.com/airsim/%{name}
Source0:        %{url}/archive/%{name}-%{version}.tar.gz

BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  boost-devel
BuildRequires:  soci-mysql-devel
BuildRequires:  soci-sqlite3-devel
BuildRequires:  readline-devel
BuildRequires:  stdair-devel

%description
%{name} aims at providing a clean API and a simple implementation, as
a C++ library, of a Travel-oriented fare engine. It corresponds to
the simulated version of the real-world Fare Quote or pricing system.

%{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) library is used.

Install the %{name} package if you need a library of basic C++ objects
for Airline Pricing and Fare Quoting (FQ), mainly for simulation purpose.

%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        doc
Summary:        HTML documentation for the %{name} library
BuildArch:      noarch
BuildRequires:  tex(latex)
BuildRequires:  texlive-epstopdf
BuildRequires:  doxygen, ghostscript

%description    doc
This package contains HTML pages, as well as a PDF reference manual,
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://%{name}.org).


%prep
%autosetup -n %{name}-%{name}-%{version} 


%build
%cmake
%cmake_build

%install
%cmake_install

# Remove the Doxygen installer
rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}/html/installdox

# Remove additional documentation files (those files are already available
# in the project top directory)
rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}/{NEWS,README.md,AUTHORS}

%check
ctest


%files
%doc AUTHORS ChangeLog COPYING NEWS README.md
%{_bindir}/%{name}
%{_bindir}/%{name}_parseFareRules
%{_libdir}/lib%{name}.so.*
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/%{name}_parseFareRules.1.*

%files devel
%{_includedir}/%{name}
%{_bindir}/%{name}-config
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/aclocal/%{name}.m4
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/CMake
%{_mandir}/man1/%{name}-config.1.*
%{_mandir}/man3/%{name}-library.3.*

%files doc
%doc %{_docdir}/%{name}/html
%doc COPYING


%changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> 1.00.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Sun Jul 10 2022 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.6-1
- Upgraded to v1.00.6

* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> 1.00.4-13
- Rebuilt for Boost 1.78

* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 1.00.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sat Aug 07 2021 Jonathan Wakely <jwakely@redhat.com> 1.00.4-11
- Rebuilt for Boost 1.76

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> 1.00.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> 1.00.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> 1.00.4-8
- Rebuilt for Boost 1.75

* Sun Aug 09 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.4-7
- Removed the docdir work around (no longer needed)

* Sun Aug 09 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.4-6
- Removed the docdir work around (no longer needed)

* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> 1.00.4-5
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> 1.00.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Sat Jun 06 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.4-3
- Rebuilt for SOCI 4.0.1-alpha2

* Wed Jun 03 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.4-2
- Rebuilt for Boost 1.73

* Sun May 31 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.4-1
- Upstream update

* Sun Feb 16 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.3-7
- Fixed the python3_version expansion issue

* Sun Feb 16 2020 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.3-6
- Fixed the armv7hl build issue

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> 1.00.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Mon Aug 19 2019 Miro Hrončok <miro@hroncok.cz> 1.00.3-4
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> 1.00.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Jul 12 2019 Miro Hrončok <miro@hroncok.cz> 1.00.3-2
- Pin the Python version this was built with

* Thu Jul 11 2019 Denis Arnaud <denis.arnaud_fedora@m4x.org> 1.00.3-1
- RPMAUTOSPEC: unresolvable merge