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