Blob Blame History Raw
Name:       orocos-bfl
%global commit c1b18e3cd8b6f57f05b08157f7b43ac0b304bd81
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global checkout 20160503git%{shortcommit}
Version:    0.8.99
Release:    7.%{checkout}%{?dist}
Summary:    A framework for inference in Dynamic Bayesian Networks

# Explanation from upstream for multiple licenses:
# "The technical reason we could not longer use the LGPL license for RTT/BFL
# software was that the LGPL is not compatible with C++ templates, which are
# used extensively in the RTT/BFL libraries. The 'runtime exception' says
# explicitly that using the C++ templates (or any other function) of the RTT
# software does not make your derived work GPL. The derived work may be
# distributed under any license you see fit."
# see http://www.orocos.org/orocos/license
# The wrong address of the FSF is reported upstream:
# http://bugs.orocos.org/show_bug.cgi?id=1060
License:    GPLv2 with exceptions and LGPLv2+
URL:        http://www.orocos.org/bfl/
Source0:    https://gitlab.mech.kuleuven.be/rob-estimation/orocos-bayesian-filtering/repository/archive.tar.gz?ref=%{commit}#/%{name}-%{commit}.tar.gz

# Unit test test_model fails on all non-x86 arches.
# The test results look like this package does not work on arm, thus exclude for
# now. This is reported upstream:
# http://bugs.orocos.org/show_bug.cgi?id=1062
ExclusiveArch: %{ix86} x86_64

BuildRequires: cmake, cppunit-devel, boost-devel, ginac-devel
BuildRequires: doxygen-latex, ghostscript-core

%description
The Bayesian Filtering Library (BFL) provides an application independent
framework for inference in Dynamic Bayesian Networks, i.e., recursive
information processing and estimation algorithms based on Bayes' rule, such as
(Extended) Kalman Filters, Particle Filters, etc.  These algorithms can, for
example, be run on top of the Realtime Services, or be used for estimation in
Kinematics & Dynamics applications.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       boost-devel, ginac-devel

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        doc
Summary:        Documentation for %{name}
BuildArch:      noarch

%description    doc
The %{name}-doc package contains documentation for %{name}.


%prep
%setup -q -n orocos-bayesian-filtering.git/orocos_bfl

%build
export LDFLAGS='-ldl'
%cmake \
  -DGINAC_SUPPORT:BOOL=ON \
  -DLIBRARY_TYPE:STRING="shared" \
  .
make %{?_smp_mflags}

includedirs="$(cpp -x c++ -v < /dev/null 2>&1 \
                | sed -e '1,/#include <\.\.\.> search/d' \
                      -e '/End of search list/,$d' | tr '\n' ' ')"
sed -i "s|INCLUDE_PATH[[:blank:]]*= |&/usr/include/boost $includedirs|" \
  Doxyfile

doxygen

%check
# Do not run the unit tests on i686, as one of the tests will fail.
# The test result looks like this is just a rounding error, so we assume the
# package works on i686 and the test is not well-designed.
# See http://bugs.orocos.org/show_bug.cgi?id=1064 for details.
%ifnarch i686
make %{?_smp_mflags} check
%endif


%install
make install DESTDIR=%{buildroot}

# tests are installed here, remove them
rm -rf %{buildroot}%{_bindir}/bfl

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc README
%license COPYING
%{_libdir}/*.so.*

%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*

%files doc
%doc doc/html
%license COPYING


%changelog
* Wed Oct 19 2016 Dan HorĂ¡k <dan[at]danny.cz> - 0.8.99-7.20160503gitc1b18e3
- Switch to ExclusiveArch, the unit test fails on ppc64/ppc64le/s390x too

* Mon Oct 03 2016 Till Hofmann <till.hofmann@posteo.de> - 0.8.99-6.20160503gitc1b18e3
- Exclude aarch64, the error is the same as on arm
- Add -ldl to the linker flags

* Wed May 04 2016 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.99-5.20160503gitc1b18e3
- Add COPYING file to doc subpackage
- Fix license and add explanation for multiple licenses
- Improve documentation

* Tue May 03 2016 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.99-4.20160503gitc1b18e3
- Update to latest commit

* Mon Jan 04 2016 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.99-3.20150905git927874e
- Change license to "LGPLv2+ and LGPLv2+ with exceptions and GPLv2+"

* Sun Oct 18 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.99-2.20150905git927874e
- Change devel package's dependency to fully versioned dependency
- Make doc package noarch

* Sat Sep 05 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.99-1.20150905git927874e
- Switch to new upstream source: gitlab snapshots
- Remove upstreamed patches

* Thu Jun 18 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.0-5
- Do not execute unit tests on i686 due to a bug in test_pdf

* Thu Jun 18 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.0-4
- Add patch 'link-against-ginac' to fix issues with undefined non-weak symbols

* Tue Jun 02 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.0-3
- Build unit tests, add BuildRequires: cppunit-devel
- ExcludeArch: arm

* Tue May 26 2015 Till Hofmann <hofmann@kbsg.rwth-aachen.de> - 0.8.0-2
- Split documentation into separate package
- Build and run tests
- Clean up and split patch

* Wed Apr 22 2015 Sebastian Reuter <sebastian.reuter@rwth-aachen.de> - 0.8.0-1
- Initial package