Name:		belr
Version:	0.1.3
Release:	1%{?dist}
URL:		https://github.com/BelledonneCommunications/belr
Source0:	https://www.linphone.org/releases/sources/belr/%{name}-%{version}.tar.gz
License:	GPLv3+
Summary:	Belledonne Communications' language recognition library
# a few C++ bits
BuildRequires:	gcc-c++
BuildRequires:	cmake, libtool, git-core
BuildRequires:	bctoolbox-devel

%description
Belr is Belledonne Communications' language recognition library.
It aims at parsing any input formatted according to a language defined by an
ABNF grammar, such as the protocols standardized at IETF.
It is based on finite state machine theory and heavily relies on recursivity
from an implementation standpoint.

%package devel
Summary:	Development libraries for belr
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description devel
Development libraries for belr.

%prep
%setup -q -n %{name}-%{version}-0

%build
%cmake . -DENABLE_STATIC=OFF

make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_libdir}/*.la

%ldconfig_scriptlets

%files
%license COPYING
%doc README.md
%{_bindir}/belr-parse
%{_libdir}/libbelr.so.*

%files devel
%{_includedir}/belr/
%{_libdir}/libbelr.so
# For cmake
%{_datadir}/Belr/

%changelog
* Thu Jan  9 2020 Tom Callaway <spot@fedoraproject.org> - 0.1.3-1
- initial package