2 # - -DENABLE_TUNNEL (BR: TunnelConfig.cmake >= 0.7.0) - proprietary?
5 %bcond_with ldap # OpenLDAP contacts provider (too old LDAP in PLD?)
6 %bcond_without lime # LIMEv2/X3DH encryption support
7 %bcond_without static_libs # static libraries
9 Summary: Linphone Internet Phone libraries
10 Summary(pl.UTF-8): Biblioteki telefonu internetowego Linphone
14 License: AGPL v3+ or proprietary
15 Group: Applications/Communications
16 #Source0Download: https://gitlab.linphone.org/BC/public/liblinphone/-/tags
17 Source0: https://gitlab.linphone.org/BC/public/liblinphone/-/archive/%{version}/%{name}-%{version}.tar.bz2
18 # Source0-md5: aa5da7c1131759bfb575276ed24f4bc1
19 Patch0: %{name}-wrappers.patch
20 Patch4: %{name}-zxing.patch
21 URL: https://www.linphone.org/technical-corner/liblinphone
22 # base and tester components
23 BuildRequires: bctoolbox-devel >= 5.3.0
24 BuildRequires: belcard-devel >= 5.3.0
25 BuildRequires: belle-sip-devel >= 5.3.0
26 BuildRequires: belr-devel >= 5.3.0
27 %{?with_lime:BuildRequires: bzrtp-devel >= 5.3.0}
28 BuildRequires: cmake >= 3.22
29 # required not only for docs, but also C++ wrappers
30 BuildRequires: doxygen
31 BuildRequires: jsoncpp-devel
32 BuildRequires: libjpeg-turbo-devel
33 BuildRequires: libsoci-devel >= 4.0
34 BuildRequires: libsoci-sqlite3-devel >= 4.0
35 BuildRequires: libstdc++-devel >= 6:7
36 BuildRequires: libxml2-devel >= 2.0
37 %{?with_lime:BuildRequires: lime-devel >= 5.3.0}
38 BuildRequires: mediastreamer-devel >= 5.3.0
39 %{?with_ldap:BuildRequires: openldap-devel}
40 BuildRequires: ortp-devel >= 5.3.0
41 BuildRequires: pkgconfig
42 BuildRequires: python3 >= 1:3
43 # to generate C++ wrappers
44 BuildRequires: python3-pystache
45 BuildRequires: python3-six
46 BuildRequires: rpm-build >= 4.6
47 BuildRequires: rpmbuild(macros) >= 1.605
48 BuildRequires: sqlite3-devel >= 3.7.0
49 BuildRequires: udev-devel
50 BuildRequires: xerces-c-devel
51 BuildRequires: zxing-cpp-nu-devel >= 1.4.0
52 BuildRequires: zlib-devel >= 1.2.3
53 Requires(post,postun): /sbin/ldconfig
54 Requires: bctoolbox >= 5.3.0
55 Requires: belcard >= 5.3.0
56 Requires: belle-sip >= 5.3.0
57 Requires: belr >= 5.3.0
58 %{?with_lime:Requires: bzrtp >= 5.3.0}
59 %{?with_lime:Requires: lime >= 5.3.0}
60 Requires: mediastreamer >= 5.3.0
61 Requires: ortp >= 5.3.0
62 Requires: sqlite3 >= 3.7.0
63 Requires: zlib >= 1.2.3
64 Obsoletes: linphone-libs < 4
65 Conflicts: linphone < 4
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 Liblinphone is a high-level SIP library integrating all calling and
70 instant messaging features into an unified easy-to-use API.
72 It is the cross-platform VoIP library on which the Linphone
73 application is based on, and that anyone can use to add audio and
74 video calls or instant messaging capabilities to an application.
76 %description -l pl.UTF-8
77 Liblinphone to wysokopoziomowa biblioteka SIP integrująca całą
78 funkcjonalność związaną z dzwonieniem i komunikacją tekstową w
79 ujednolicone, łatwe w użyciu API.
81 Jest to wieloplatformowa biblioteka VoIP, na której oparta jest
82 aplikacja Linphone; może jej używać każdy, kto chce dodać do
83 swojej aplikacji obsługę połączeń dźwiękowych lub wideo albo
84 komunikacji tekstowej.
87 Summary: Header files for Linphone library
88 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Linphone
89 Group: Development/Libraries
90 Requires: %{name} = %{version}-%{release}
91 Requires: bctoolbox-devel >= 5.3.0
92 Requires: belle-sip-devel >= 5.3.0
93 Requires: belr-devel >= 5.3.0
94 %{?with_lime:Requires: bzrtp-devel >= 5.3.0}
95 Requires: jsoncpp-devel
96 Requires: libstdc++-devel >= 6:7
97 Requires: libxml2-devel >= 2.0
98 %{?with_lime:Requires: lime-devel >= 5.3.0}
99 Requires: mediastreamer-devel >= 5.3.0
100 Requires: ortp-devel >= 5.3.0
101 Requires: sqlite3-devel >= 3.7.0
102 Requires: zlib-devel >= 1.2.3
103 Obsoletes: linphone-devel < 4
106 Development files for the Linphone library.
108 %description devel -l pl.UTF-8
109 Pliki dla programistów używających biblioteki Linphone.
112 Summary: Linphone static library
113 Summary(pl.UTF-8): Statyczna biblioteka Linphone
114 Group: Development/Libraries
115 Requires: %{name}-devel = %{version}-%{release}
116 Obsoletes: linphone-static < 4
119 Static version of Linphone library.
121 %description static -l pl.UTF-8
122 Statyczna wersja biblioteki Linphone.
125 Summary: API documentation for Linphone library
126 Summary(pl.UTF-8): Dokumentacja API biblioteki Linphone
128 Obsoletes: linphone-apidocs < 4
132 API documentation for Linphone library.
134 %description apidocs -l pl.UTF-8
135 Dokumentacja API biblioteki Linphone.
138 Summary: C++ wrapper for Linphone library
139 Summary(pl.UTF-8): Interfejs C++ do biblioteki Linphone
141 Requires: %{name} = %{version}-%{release}
142 Obsoletes: linphone-c++ < 4
145 C++ wrapper for Linphone library.
147 %description c++ -l pl.UTF-8
148 Interfejs C++ do biblioteki Linphone.
151 Summary: Headers for liblinphone++ library
152 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki liblinphone++
153 Group: Development/Libraries
154 Requires: %{name}-c++ = %{version}-%{release}
155 Requires: %{name}-devel = %{version}-%{release}
156 Obsoletes: linphone-c++-devel < 4
158 %description c++-devel
159 Headers for liblinphone++ library.
161 %description c++-devel -l pl.UTF-8
162 Pliki nagłówkowe biblioteki liblinphone++.
165 Summary: Static liblinphone++ library
166 Summary(pl.UTF-8): Statyczna biblioteka liblinphone++
167 Group: Development/Libraries
168 Requires: %{name}-c++-devel = %{version}-%{release}
169 Obsoletes: linphone-c++-static < 4
171 %description c++-static
172 Static liblinphone++ library.
174 %description c++-static -l pl.UTF-8
175 Statyczna biblioteka liblinphone++.
178 Summary: API documentation for Linphone C++ library
179 Summary(pl.UTF-8): Dokumentacja API biblioteki C++ Linphone
181 Obsoletes: linphone-c++-apidocs < 4
184 %description c++-apidocs
185 API documentation for Linphone C++ library.
187 %description c++-apidocs -l pl.UTF-8
188 Dokumentacja API biblioteki C++ Linphone.
190 %package -n linphonec
191 Summary: Linphone Internet Phone console interface
192 Summary(pl.UTF-8): Linphone - telefon internetowy, interfejs konsolowy
193 Group: Applications/Communications
194 Requires: %{name} = %{version}-%{release}
196 %description -n linphonec
197 Linphonec is the console version of originally GNOME Internet phone
200 %description -n linphonec -l pl.UTF-8
201 Linphonec to konsolowa wersja telefonu internetowego Linphone
202 pochodzącego z GNOME.
210 %if %{with static_libs}
211 %cmake -B builddir-static \
212 -DBUILD_SHARED_LIBS=OFF \
213 %{?with_ldap:-DENABLE_LDAP=ON} \
214 %{!?with_lime:-DENABLE_LIME_X3DH=OFF} \
216 -DENABLE_UNIT_TESTS=OFF
218 %{__make} -C builddir-static
222 -DENABLE_CONSOLE_UI=ON \
224 %{?with_ldap:-DENABLE_LDAP=ON} \
225 %{!?with_lime:-DENABLE_LIME_X3DH=OFF} \
226 -DENABLE_STRICT=OFF \
227 -DENABLE_UNIT_TESTS=OFF
229 %{__make} -C builddir
232 rm -rf $RPM_BUILD_ROOT
234 %if %{with static_libs}
235 %{__make} -C builddir-static install \
236 DESTDIR=$RPM_BUILD_ROOT
239 %{__make} -C builddir install \
240 DESTDIR=$RPM_BUILD_ROOT
243 %{__rm} $RPM_BUILD_ROOT%{_bindir}/liblinphone-{lpc2xml-test,test-ecc,xml2lpc-test}
244 %{__rm} $RPM_BUILD_ROOT%{_bindir}/linphone-daemon-pipetest
247 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblinphone-5.3.0
249 # omitted by cmake install
250 install -d $RPM_BUILD_ROOT%{_mandir}/{man1,cs/man1}
251 cp -p share/C/{linphonec,linphonecsh}.1 $RPM_BUILD_ROOT%{_mandir}/man1
252 cp -p share/cs/linphonec.1 $RPM_BUILD_ROOT%{_mandir}/cs/man1
255 [ ! -d $RPM_BUILD_ROOT%{_pkgconfigdir} ] || exit 1
256 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
257 cat >$RPM_BUILD_ROOT%{_pkgconfigdir}/linphone.pc <<'EOF'
259 exec_prefix=%{_prefix}
261 includedir=%{_includedir}
264 Requires: mediastreamer ortp bctoolbox
265 Description: All in one linphone libs.
267 Libs: -L${libdir} -llinphone
268 Cflags: -I${includedir}
271 cat >$RPM_BUILD_ROOT%{_pkgconfigdir}/linphone++.pc <<'EOF'
273 exec_prefix=%{_prefix}
275 includedir=%{_includedir}
278 Requires.private: linphone bctoolbox belle-sip
279 Description: C++ wrapper for linphone libraries.
281 Libs: -L${libdir} -llinphone++
282 Cflags: -I${includedir}
286 rm -rf $RPM_BUILD_ROOT
288 %post -p /sbin/ldconfig
289 %postun -p /sbin/ldconfig
291 %post c++ -p /sbin/ldconfig
292 %postun c++ -p /sbin/ldconfig
295 %defattr(644,root,root,755)
296 %doc CHANGELOG.md NEWS README.md
297 %attr(755,root,root) %{_bindir}/liblinphone-auto-answer
298 %attr(755,root,root) %{_bindir}/liblinphone-sendmsg
299 %attr(755,root,root) %{_bindir}/linphone-daemon
300 %attr(755,root,root) %{_libdir}/liblinphone.so.10
301 %{_datadir}/belr/grammars/cpim_grammar
302 %{_datadir}/belr/grammars/ics_grammar
303 %{_datadir}/belr/grammars/identity_grammar
305 %{_datadir}/sounds/linphone
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/liblinphone.so
310 %{_includedir}/linphone
311 %{_pkgconfigdir}/linphone.pc
312 %dir %{_datadir}/LibLinphone
313 %{_datadir}/LibLinphone/cmake
315 %if %{with static_libs}
317 %defattr(644,root,root,755)
318 %{_libdir}/liblinphone.a
322 %defattr(644,root,root,755)
323 %doc builddir/coreapi/help/doc/doxygen/c/{*.css,*.html,*.js,*.png}
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/liblinphone++.so.10
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/liblinphone++.so
332 %{_includedir}/linphone++
333 %{_pkgconfigdir}/linphone++.pc
334 %dir %{_datadir}/LinphoneCxx
335 %{_datadir}/LinphoneCxx/cmake
337 %if %{with static_libs}
339 %defattr(644,root,root,755)
340 %{_libdir}/liblinphone++.a
344 %defattr(644,root,root,755)
345 %doc builddir/wrappers/cpp/cpp/{*.css,*.html,*.js,*.png}
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_bindir}/linphonec
350 %attr(755,root,root) %{_bindir}/linphonecsh
351 %{_mandir}/man1/linphonec.1*
352 %{_mandir}/man1/linphonecsh.1*
353 %lang(cs) %{_mandir}/cs/man1/linphonec.1*