]> git.pld-linux.org Git - packages/belr.git/blame - belr.spec
- updated to 5.3.29
[packages/belr.git] / belr.spec
CommitLineData
6e8c327a
JB
1#
2# Conditional build:
3%bcond_without static_libs # static library
4#
5Summary: Belledonne Communications' language recognition library
6Summary(pl.UTF-8): Biblioteka rozpoznawania języków Belledonne Communications
7Name: belr
6866f902 8Version: 5.3.29
6e8c327a 9Release: 1
7ec9b571 10License: GPL v3+
6e8c327a 11Group: Libraries
7ec9b571
JB
12#Source0Download: https://gitlab.linphone.org/BC/public/belr/-/tags
13Source0: https://gitlab.linphone.org/BC/public/belr/-/archive/%{version}/%{name}-%{version}.tar.bz2
6866f902 14# Source0-md5: 8fa28394bab7c78c5821ceb0caac95d8
6e8c327a 15URL: https://linphone.org/
6866f902
JB
16BuildRequires: bctoolbox-devel >= 5.3.0
17BuildRequires: cmake >= 3.22
18BuildRequires: libstdc++-devel >= 6:7
6e8c327a 19BuildRequires: pkgconfig
7ec9b571 20BuildRequires: udev-devel
6866f902 21Requires: bctoolbox >= 5.3.0
6e8c327a
JB
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25Belr is Belledonne Communications' language recognition library. It
26aims at parsing any input formatted according to a language defined by
27an ABNF grammar, such as the protocols standardized at IETF.
28
29It is based on finite state machine theory and heavily relies on
30recursivity from an implementation standpoint.
31
32%description -l pl.UTF-8
33Belr to biblioteka do rozpoznawania języków Belledonne Communications.
34Jej celem jest analiza dowolnego wejścia sformatowanego zgodnie z
35językiem zdefiniowanym przez gramatykę ABNF, np. protokołów
36standaryzowanych przez IETF.
37
38Biblioteka jest oparta na teorii automatów skończonych, implementacja
39znacząco wykorzystuje rekusywność.
40
41%package devel
42Summary: Header files for belr library
43Summary(pl.UTF-8): Pliki nagłówkowe biblioteki belr
44Group: Development/Libraries
45Requires: %{name} = %{version}-%{release}
6866f902
JB
46Requires: bctoolbox-devel >= 5.3.0
47Requires: libstdc++-devel >= 6:7
6e8c327a
JB
48
49%description devel
50Header files for belr library.
51
52%description devel -l pl.UTF-8
53Pliki nagłówkowe biblioteki belr.
54
55%package static
56Summary: Static belr library
57Summary(pl.UTF-8): Statyczna biblioteka belr
58Group: Development/Libraries
59Requires: %{name}-devel = %{version}-%{release}
60
61%description static
62Static belr library.
63
64%description static -l pl.UTF-8
65Statyczna biblioteka belr.
66
67%prep
7ec9b571 68%setup -q
6e8c327a
JB
69
70%build
6866f902
JB
71%if %{with static_libs}
72%cmake -B builddir-static \
73 -DBUILD_SHARED_LIBS=OFF \
74 -DCMAKE_INSTALL_DATADIR=share \
75 -DENABLE_UNIT_TESTS=OFF
76
77%{__make} -C builddir-static
78%endif
79
56ebee78 80# cmake build relies on relative CMAKE_INSTALL_DATADIR
6866f902 81%cmake -B builddir \
56ebee78 82 -DCMAKE_INSTALL_DATADIR=share \
6866f902 83 -DENABLE_UNIT_TESTS=OFF
6e8c327a 84
6866f902 85%{__make} -C builddir
6e8c327a
JB
86
87%install
88rm -rf $RPM_BUILD_ROOT
89
6866f902
JB
90%if %{with static_libs}
91%{__make} -C builddir-static install \
92 DESTDIR=$RPM_BUILD_ROOT
93%endif
94
56ebee78 95%{__make} -C builddir install \
6e8c327a
JB
96 DESTDIR=$RPM_BUILD_ROOT
97
56ebee78
JB
98# dir for grammars (see CMakeLists.txt)
99install -d $RPM_BUILD_ROOT%{_datadir}/belr/grammars
100
7ec9b571
JB
101# missing from cmake
102test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/belr.pc
103install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
104%{__sed} -e 's,@CMAKE_INSTALL_PREFIX@,%{_prefix},' \
105 -e 's,@PROJECT_NAME@,belr,' \
106 -e 's,@PROJECT_VERSION@,%{version},' \
107 -e 's,@CMAKE_INSTALL_FULL_LIBDIR@,%{_libdir},' \
108 -e 's,@LIBS_PRIVATE@,-lbctoolbox,' \
109 -e 's,@CMAKE_INSTALL_FULL_INCLUDEDIR@,%{_includedir},' \
110 belr.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/belr.pc
6e8c327a
JB
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%post -p /sbin/ldconfig
116%postun -p /sbin/ldconfig
117
118%files
119%defattr(644,root,root,755)
7ec9b571
JB
120%doc CHANGELOG.md README.md
121%attr(755,root,root) %{_bindir}/belr-compiler
6e8c327a 122%attr(755,root,root) %{_bindir}/belr-parse
7ec9b571 123%attr(755,root,root) %{_libdir}/libbelr.so.1
56ebee78
JB
124%dir %{_datadir}/belr
125%dir %{_datadir}/belr/grammars
6e8c327a
JB
126
127%files devel
128%defattr(644,root,root,755)
129%attr(755,root,root) %{_libdir}/libbelr.so
130%{_includedir}/belr
131%{_pkgconfigdir}/belr.pc
6866f902 132%{_libdir}/cmake/Belr
6e8c327a
JB
133
134%if %{with static_libs}
135%files static
136%defattr(644,root,root,755)
137%{_libdir}/libbelr.a
138%endif
This page took 0.130513 seconds and 4 git commands to generate.