]> git.pld-linux.org Git - packages/liblinphone.git/blob - liblinphone.spec
- updated to 5.3.32
[packages/liblinphone.git] / liblinphone.spec
1 # TODO:
2 # - -DENABLE_TUNNEL (BR: TunnelConfig.cmake >= 0.7.0) - proprietary?
3 #
4 # Conditional build:
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
8
9 Summary:        Linphone Internet Phone libraries
10 Summary(pl.UTF-8):      Biblioteki telefonu internetowego Linphone
11 Name:           liblinphone
12 Version:        5.3.32
13 Release:        1
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)
67
68 %description
69 Liblinphone is a high-level SIP library integrating all calling and
70 instant messaging features into an unified easy-to-use API.
71
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.
75
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.
80
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.
85
86 %package devel
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
104
105 %description devel
106 Development files for the Linphone library.
107
108 %description devel -l pl.UTF-8
109 Pliki dla programistów używających biblioteki Linphone.
110
111 %package static
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
117
118 %description static
119 Static version of Linphone library.
120
121 %description static -l pl.UTF-8
122 Statyczna wersja biblioteki Linphone.
123
124 %package apidocs
125 Summary:        API documentation for Linphone library
126 Summary(pl.UTF-8):      Dokumentacja API biblioteki Linphone
127 Group:          Documentation
128 Obsoletes:      linphone-apidocs < 4
129 BuildArch:      noarch
130
131 %description apidocs
132 API documentation for Linphone library.
133
134 %description apidocs -l pl.UTF-8
135 Dokumentacja API biblioteki Linphone.
136
137 %package c++
138 Summary:        C++ wrapper for Linphone library
139 Summary(pl.UTF-8):      Interfejs C++ do biblioteki Linphone
140 Group:          Libraries
141 Requires:       %{name} = %{version}-%{release}
142 Obsoletes:      linphone-c++ < 4
143
144 %description c++
145 C++ wrapper for Linphone library.
146
147 %description c++ -l pl.UTF-8
148 Interfejs C++ do biblioteki Linphone.
149
150 %package c++-devel
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
157
158 %description c++-devel
159 Headers for liblinphone++ library.
160
161 %description c++-devel -l pl.UTF-8
162 Pliki nagłówkowe biblioteki liblinphone++.
163
164 %package c++-static
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
170
171 %description c++-static
172 Static liblinphone++ library.
173
174 %description c++-static -l pl.UTF-8
175 Statyczna biblioteka liblinphone++.
176
177 %package c++-apidocs
178 Summary:        API documentation for Linphone C++ library
179 Summary(pl.UTF-8):      Dokumentacja API biblioteki C++ Linphone
180 Group:          Documentation
181 Obsoletes:      linphone-c++-apidocs < 4
182 BuildArch:      noarch
183
184 %description c++-apidocs
185 API documentation for Linphone C++ library.
186
187 %description c++-apidocs -l pl.UTF-8
188 Dokumentacja API biblioteki C++ Linphone.
189
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}
195
196 %description -n linphonec
197 Linphonec is the console version of originally GNOME Internet phone
198 Linphone.
199
200 %description -n linphonec -l pl.UTF-8
201 Linphonec to konsolowa wersja telefonu internetowego Linphone
202 pochodzącego z GNOME.
203
204 %prep
205 %setup -q
206 %patch0 -p1
207 %patch4 -p1
208
209 %build
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} \
215         -DENABLE_TOOLS=OFF \
216         -DENABLE_UNIT_TESTS=OFF
217
218 %{__make} -C builddir-static
219 %endif
220
221 %cmake -B builddir \
222         -DENABLE_CONSOLE_UI=ON \
223         -DENABLE_DOC=ON \
224         %{?with_ldap:-DENABLE_LDAP=ON} \
225         %{!?with_lime:-DENABLE_LIME_X3DH=OFF} \
226         -DENABLE_STRICT=OFF \
227         -DENABLE_UNIT_TESTS=OFF
228
229 %{__make} -C builddir
230
231 %install
232 rm -rf $RPM_BUILD_ROOT
233
234 %if %{with static_libs}
235 %{__make} -C builddir-static install \
236         DESTDIR=$RPM_BUILD_ROOT
237 %endif
238
239 %{__make} -C builddir install \
240         DESTDIR=$RPM_BUILD_ROOT
241
242 # some tests
243 %{__rm} $RPM_BUILD_ROOT%{_bindir}/liblinphone-{lpc2xml-test,test-ecc,xml2lpc-test}
244 %{__rm} $RPM_BUILD_ROOT%{_bindir}/linphone-daemon-pipetest
245
246 # packaged as %doc
247 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblinphone-5.3.0
248
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
253
254 # missing in 4+
255 [ ! -d $RPM_BUILD_ROOT%{_pkgconfigdir} ] || exit 1
256 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
257 cat >$RPM_BUILD_ROOT%{_pkgconfigdir}/linphone.pc <<'EOF'
258 prefix=%{_prefix}
259 exec_prefix=%{_prefix}
260 libdir=%{_libdir}
261 includedir=%{_includedir}
262
263 Name: liblinphone
264 Requires: mediastreamer ortp bctoolbox
265 Description: All in one linphone libs.
266 Version: %{version}
267 Libs: -L${libdir} -llinphone
268 Cflags: -I${includedir}
269 EOF
270
271 cat >$RPM_BUILD_ROOT%{_pkgconfigdir}/linphone++.pc <<'EOF'
272 prefix=%{_prefix}
273 exec_prefix=%{_prefix}
274 libdir=%{_libdir}
275 includedir=%{_includedir}
276
277 Name: liblinphone++
278 Requires.private: linphone bctoolbox belle-sip
279 Description: C++ wrapper for linphone libraries.
280 Version: %{version}
281 Libs: -L${libdir} -llinphone++
282 Cflags: -I${includedir}
283 EOF
284
285 %clean
286 rm -rf $RPM_BUILD_ROOT
287
288 %post   -p /sbin/ldconfig
289 %postun -p /sbin/ldconfig
290
291 %post   c++ -p /sbin/ldconfig
292 %postun c++ -p /sbin/ldconfig
293
294 %files
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
304 %{_datadir}/linphone
305 %{_datadir}/sounds/linphone
306
307 %files devel
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
314
315 %if %{with static_libs}
316 %files static
317 %defattr(644,root,root,755)
318 %{_libdir}/liblinphone.a
319 %endif
320
321 %files apidocs
322 %defattr(644,root,root,755)
323 %doc builddir/coreapi/help/doc/doxygen/c/{*.css,*.html,*.js,*.png}
324
325 %files c++
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/liblinphone++.so.10
328
329 %files c++-devel
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
336
337 %if %{with static_libs}
338 %files c++-static
339 %defattr(644,root,root,755)
340 %{_libdir}/liblinphone++.a
341 %endif
342
343 %files c++-apidocs
344 %defattr(644,root,root,755)
345 %doc builddir/wrappers/cpp/cpp/{*.css,*.html,*.js,*.png}
346
347 %files -n linphonec
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*
This page took 0.08432 seconds and 3 git commands to generate.