066e71a
#
066e71a
%global mydocs __tmp_docdir
066e71a
#
066e71a
Name:           airrac
066e71a
Version:        0.1.0
066e71a
Release:        2%{?dist}
066e71a
066e71a
Summary:        C++ Simulated Revenue Accounting (RAC) System Library
066e71a
066e71a
Group:          System Environment/Libraries 
066e71a
License:        LGPLv2+
066e71a
URL:            http://sourceforge.net/projects/%{name}/
066e71a
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
066e71a
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
066e71a
066e71a
BuildRequires:  cmake, python-devel
066e71a
BuildRequires:  boost-devel, soci-mysql-devel, zeromq-devel
066e71a
BuildRequires:  stdair-devel
066e71a
066e71a
066e71a
%description
066e71a
%{name} is a C++ library of airline revenue accounting classes and
066e71a
functions, mainly targeting simulation purposes.
066e71a
066e71a
%{name} makes an extensive use of existing open-source libraries for
066e71a
increased functionality, speed and accuracy. In particular the
066e71a
Boost (C++ Standard Extensions: http://www.boost.org) library is used.
066e71a
066e71a
Install the %{name} package if you need a library of basic C++ objects
066e71a
for Airline Revenue Accounting, mainly for simulation purpose.
066e71a
066e71a
%package        devel
066e71a
Summary:        Header files, libraries and development documentation for %{name}
066e71a
Group:          Development/Libraries
066e71a
Requires:       %{name}%{?_isa} = %{version}-%{release}
066e71a
Requires:       pkgconfig
066e71a
066e71a
%description    devel
066e71a
This package contains the header files, static libraries and
066e71a
development documentation for %{name}. If you would like to develop
066e71a
programs using %{name}, you will need to install %{name}-devel.
066e71a
066e71a
%package doc
066e71a
Summary:        HTML documentation for the %{name} library
066e71a
Group:          Documentation
066e71a
%{?fedora:BuildArch:      noarch}
066e71a
BuildRequires:  tex(latex)
066e71a
BuildRequires:  doxygen, ghostscript, graphviz
066e71a
066e71a
%description doc
066e71a
This package contains the documentation in the HTML format of the %{name}
066e71a
library. The documentation is the same as at the %{name} web page.
066e71a
066e71a
066e71a
%prep
066e71a
%setup -q
066e71a
# Fix some permissions and formats
066e71a
chmod -x AUTHORS ChangeLog COPYING NEWS README
066e71a
find . -type f -name '*.[hc]pp' -exec chmod -x {} \;
066e71a
066e71a
066e71a
%build
066e71a
%cmake .
066e71a
make %{?_smp_mflags}
066e71a
066e71a
%install
066e71a
rm -rf $RPM_BUILD_ROOT
066e71a
make install DESTDIR=$RPM_BUILD_ROOT
066e71a
066e71a
mkdir -p %{mydocs}
066e71a
mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs}
066e71a
rm -f %{mydocs}/html/installdox
066e71a
066e71a
%check
066e71a
ctest
066e71a
066e71a
%clean
066e71a
rm -rf $RPM_BUILD_ROOT
066e71a
066e71a
%post -p /sbin/ldconfig
066e71a
066e71a
%postun -p /sbin/ldconfig
066e71a
066e71a
066e71a
%files
066e71a
%defattr(-,root,root,-)
066e71a
%doc AUTHORS ChangeLog COPYING NEWS README
066e71a
%{_bindir}/%{name}
066e71a
%{_libdir}/lib*.so.*
066e71a
%{_mandir}/man1/%{name}.1.*
066e71a
066e71a
%files devel
066e71a
%defattr(-,root,root,-)
066e71a
%{_includedir}/%{name}
066e71a
%{_bindir}/%{name}-config
066e71a
%{_libdir}/lib%{name}.so
066e71a
%{_libdir}/pkgconfig/%{name}.pc
066e71a
%{_datadir}/aclocal/%{name}.m4
066e71a
%dir %{_datadir}/%{name}
066e71a
%{_datadir}/%{name}/CMake
066e71a
%{_mandir}/man1/%{name}-config.1.*
066e71a
%{_mandir}/man3/%{name}-library.3.*
066e71a
066e71a
%files doc
066e71a
%defattr(-,root,root,-)
066e71a
%doc %{mydocs}/html
066e71a
%doc COPYING
066e71a
066e71a
066e71a
%changelog
066e71a
* Fri Aug 19 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.1.0-2
066e71a
- Took into account the feedback from the package review (#728649)
066e71a
066e71a
* Fri Aug 05 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.1.0-1
066e71a
- First package