]> git.pld-linux.org Git - packages/linphone.git/blob - linphone.spec
- added cxx-autotools patch (enable linphone++ build when using autotools; cmake...
[packages/linphone.git] / linphone.spec
1 # TODO:
2 # - --enable-tunnel (BR: pkgconfig(tunnel) >= 0.6.0)
3 # - switch from polarssl to mbedtls (upstream forgot? bctoolbox uses mbedtls)
4 # - fill in dependencies for !system_ortp, !system_mediastreamer
5 # - check if all this configure option I've set are really needed
6 # - separate libraries that do not require gnome into subpackages for Jingle support in kopete
7 # - if system_mediastreamerpackages copies for "libmediastreamer.so.1", "libortp.so.8" libraries
8 #   those should be installed to private path and LD_LIBARY_PATH setup with wrappers.
9 #   without doing so do not stbr it to Th!
10 #
11 # Conditional build:
12 %bcond_without  ldap                    # LDAP support
13 %bcond_without  openssl                 # SSL support
14 %bcond_without  static_libs             # static libraries
15 %bcond_without  system_ortp             # use custom ortp
16 %bcond_without  system_mediastreamer    # use custom mediastreamer
17 %bcond_without  zrtp                    # ZRTP support
18
19 Summary:        Linphone Internet Phone
20 Summary(pl.UTF-8):      Linphone - telefon internetowy
21 Name:           linphone
22 Version:        3.12.0
23 Release:        6
24 License:        GPL v2+
25 Group:          Applications/Communications
26 Source0:        http://linphone.org/releases/sources/linphone/%{name}-%{version}.tar.gz
27 # Source0-md5:  8292dbaa0a5d0a448dcbbee125e947e4
28 Patch0:         %{name}-sh.patch
29 Patch1:         build.patch
30 Patch2:         %{name}-cxx-autotools.patch
31 Patch3:         %{name}-no-rebuild.patch
32 URL:            http://www.linphone.org/
33 BuildRequires:  autoconf >= 2.50
34 BuildRequires:  automake >= 1:1.9
35 BuildRequires:  bctoolbox-devel >= 0.0.3
36 BuildRequires:  belcard-devel
37 BuildRequires:  belle-sip-devel >= 1.5.0
38 %{?with_zrtp:BuildRequires:     bzrtp-devel >= 1.0.0}
39 %{?with_ldap:BuildRequires:     cyrus-sasl-devel >= 2}
40 BuildRequires:  doxygen
41 BuildRequires:  gettext-tools
42 BuildRequires:  glib2-devel >= 1:2.26.0
43 BuildRequires:  gtk+2-devel >= 2:2.22.0
44 BuildRequires:  intltool >= 0.40
45 BuildRequires:  libnotify-devel >= 0.7.0
46 BuildRequires:  libstdc++-devel
47 BuildRequires:  libtool >= 2:2
48 BuildRequires:  libupnp-devel < 1.7
49 BuildRequires:  libupnp-devel >= 1.6
50 BuildRequires:  libxml2-devel >= 2.0
51 %{?with_system_mediastreamer:BuildRequires:     mediastreamer-devel >= 2.12.1}
52 BuildRequires:  ncurses-devel
53 %{?with_ldap:BuildRequires:     openldap-devel}
54 %{?with_openssl:BuildRequires:  openssl-devel >= 0.9.8}
55 %{?with_system_ortp:BuildRequires:      ortp-devel >= 0.24.0}
56 BuildRequires:  pkgconfig
57 BuildRequires:  polarssl-devel >= 1.3
58 # to generate C++ wrappers
59 BuildRequires:  python-pystache
60 BuildRequires:  readline-devel
61 BuildRequires:  rpmbuild(macros) >= 1.98
62 BuildRequires:  speex-devel >= 1:1.1.6
63 BuildRequires:  sqlite3-devel >= 3.7.0
64 BuildRequires:  udev-devel
65 BuildRequires:  xorg-lib-libX11-devel
66 BuildRequires:  xorg-lib-libXv-devel
67 BuildRequires:  zlib-devel >= 1.2.3
68 %if %{without system_mediastreamer}
69 BuildRequires:  libgsm-devel >= 1.0.10
70 BuildRequires:  pulseaudio-devel
71 BuildRequires:  speexdsp-devel >= 1.2-beta3
72 %endif
73 Requires:       %{name}-libs = %{version}-%{release}
74 Requires:       libnotify >= 0.7.0
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %if %{without system_ortp}
78 %define         _noautoreq_1    libortp\.so.*
79 %endif
80 %if %{without system_mediastreamer}
81 %define         _noautoreq_2    libmediastreamer\.so.*
82 %endif
83
84 %define         _noautoreq      %{?_noautoreq_1} %{?_noautoreq_2}
85 %define         _noautoprov     %{?_noautoreq}
86
87 %description
88 Linphone is a web phone: it let you phone to your friends anywhere in
89 the whole world, freely, simply by using the internet. The cost of the
90 phone call is the cost that you spend connected to the internet.
91
92 Here are the main features of linphone:
93 - Works with the GNOME Desktop under linux.
94 - Works as simply as a cellular phone. Two buttons, no more.
95 - Understands the SIP protocol.
96 - You just require a soundcard to use linphone.
97 - Linphone is free software, released under the General Public
98   Licence.
99 - Linphone is documented: there is a complete user manual readable
100   from the application that explains you all you need to know.
101
102 %description -l pl.UTF-8
103 Linphone to telefon internetowy - pozwala dzwonić do znajomych na
104 całym świecie bez dodatkowych opłat, używając tylko Internetu.
105
106 Główne cechy linphone:
107 - działanie ze środowiskiem GNOME
108 - naśladowanie prostego telefonu komórkowego - tylko dwa przyciski
109 - obsługa protokołu SIP
110 - wymaga karty dźwiękowej
111 - jest wolnodostępnym oprogramowaniem (na licencji GPL)
112 - ma dokumentację: pełny podręcznik dostępny z aplikacji.
113
114 %package -n linphonec
115 Summary:        Linphone Internet Phone console interface
116 Summary(pl.UTF-8):      Linphone - telefon internetowy, interfejs konsolowy
117 Group:          Applications/Communications
118 Requires:       %{name}-libs = %{version}-%{release}
119
120 %description -n linphonec
121 Linphonec is the console version of originally GNOME Internet phone
122 Linphone.
123
124 %description -n linphonec -l pl.UTF-8
125 Linphonec to konsolowa wersja telefonu internetowego Linphone
126 pochodzącego z GNOME.
127
128 %package libs
129 Summary:        Linphone libraries
130 Summary(pl.UTF-8):      Biblioteki Linphone
131 Group:          Libraries
132 Requires(post,postun):  /sbin/ldconfig
133 Requires:       bctoolbox >= 0.0.3
134 Requires:       belle-sip >= 1.5.0
135 %{?with_zrtp:Requires:  bzrtp >= 1.0.0}
136 Requires:       glib2 >= 1:2.26.0
137 Requires:       gtk+2 >= 2:2.22.0
138 %{?with_system_mediastreamer:Requires:  mediastreamer >= 2.11.0}
139 %{?with_system_ortp:Requires:   ortp >= 0.24.0}
140 Requires:       sqlite3 >= 3.7.0
141 Requires:       zlib >= 1.2.3
142
143 %description libs
144 Linphone libraries.
145
146 %description libs -l pl.UTF-8
147 Biblioteki Linphone.
148
149 %package devel
150 Summary:        Linphone Internet Phone - header files
151 Summary(pl.UTF-8):      Telefon internetowy Linphone - pliki nagłówkowe
152 Group:          Development/Libraries
153 Requires:       %{name}-libs = %{version}-%{release}
154 Requires:       bctoolbox-devel >= 0.0.3
155 Requires:       belle-sip-devel >= 1.5.0
156 %{?with_zrtp:Requires:  bzrtp-devel >= 1.0.0}
157 Requires:       glib2-devel >= 1:2.26.0
158 Requires:       gtk+2-devel >= 2:2.22.0
159 Requires:       libstdc++-devel
160 Requires:       libxml2-devel >= 2.0
161 %{?with_system_mediastreamer:Requires:  mediastreamer-devel >= 2.11.0}
162 %{?with_ldap:Requires:  openldap-devel}
163 %{?with_system_ortp:Requires:   ortp-devel >= 0.24.0}
164 Requires:       sqlite3-devel >= 3.7.0
165 Requires:       zlib-devel >= 1.2.3
166 %if %{without system_mediastreamer}
167 Requires:       libgsm-devel >= 1.0.10
168 Requires:       speexdsp-devel >= 1.2-beta3
169 %endif
170
171 %description devel
172 Development files for the Linphone Internet Phone.
173
174 %description devel -l pl.UTF-8
175 Pliki dla programistów używających telefonu internetowego Linphone.
176
177 %package static
178 Summary:        Linphone static libraries
179 Summary(pl.UTF-8):      Statyczne biblioteki Linphone
180 Group:          Development/Libraries
181 Requires:       %{name}-devel = %{version}-%{release}
182
183 %description static
184 Static version of Linphone libraries.
185
186 %description static -l pl.UTF-8
187 Statyczne wersje bibliotek Linphone.
188
189 %package apidocs
190 Summary:        API documentation for Linphone library
191 Summary(pl.UTF-8):      Dokumentacja API biblioteki Linphone
192 Group:          Documentation
193
194 %description apidocs
195 API documentation for Linphone library.
196
197 %description apidocs -l pl.UTF-8
198 Dokumentacja API biblioteki Linphone.
199
200 %package c++
201 Summary:        C++ wrapper for Linphone library
202 Summary(pl.UTF-8):      Interfejs C++ do biblioteki Linphone
203 Group:          Libraries
204 Requires:       %{name}-libs = %{version}-%{release}
205
206 %description c++
207 C++ wrapper for Linphone library.
208
209 %description c++ -l pl.UTF-8
210 Interfejs C++ do biblioteki Linphone.
211
212 %package c++-devel
213 Summary:        Headers for liblinphone++ library
214 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki liblinphone++
215 Group:          Development/Libraries
216 Requires:       %{name}-c++ = %{version}-%{release}
217 Requires:       %{name}-devel = %{version}-%{release}
218
219 %description c++-devel
220 Headers for liblinphone++ library.
221
222 %description c++-devel -l pl.UTF-8
223 Pliki nagłówkowe biblioteki liblinphone++.
224
225 %package c++-static
226 Summary:        Static liblinphone++ library
227 Summary(pl.UTF-8):      Statyczna biblioteka liblinphone++
228 Group:          Development/Libraries
229 Requires:       %{name}-c++-devel = %{version}-%{release}
230
231 %description c++-static
232 Static liblinphone++ library.
233
234 %description c++-static -l pl.UTF-8
235 Statyczna biblioteka liblinphone++.
236
237 %prep
238 %setup -q
239 %patch0 -p1
240 %patch1 -p1
241 %patch2 -p1
242 %patch3 -p1
243
244 [ ! -e gitversion.h ] && echo '#define LIBLINPHONE_GIT_VERSION "%{version}"' > coreapi/gitversion.h
245
246 %build
247 %{__gettextize}
248 %{__intltoolize}
249 %{__libtoolize}
250 %{__aclocal} -I m4
251 %{__autoconf}
252 %{__autoheader}
253 %{__automake}
254 %if %{without system_ortp}
255 cd oRTP
256 %{__libtoolize}
257 %{__aclocal}
258 %{__autoconf}
259 %{__autoheader}
260 %{__automake}
261 cd ..
262 %endif
263 %if %{without system_ortp}
264 cd mediastreamer2
265 %{__libtoolize}
266 %{__aclocal}
267 %{__autoconf}
268 %{__autoheader}
269 %{__automake}
270 cd ..
271 %endif
272
273 %configure \
274         --with-html-dir=%{_gtkdocdir} \
275         %{?with_system_mediastreamer:--enable-external-mediastreamer} \
276         %{?with_system_ortp:--enable-external-ortp} \
277         --enable-ipv6 \
278         %{?with_ldap:--enable-ldap} \
279         --disable-silent-rules \
280         %{?with_openssl:--enable-ssl} \
281         %{?with_static_libs:--enable-static} \
282         --disable-strict \
283         %{!?with_zrtp:--disable-zrtp}
284
285 # although main configure already calls {oRTP,mediastreamer2}/configure,
286 # reconfigure them with different dirs
287 %if %{without system_ortp}
288 cd oRTP
289 %configure \
290         --includedir=%{_libdir}/%{name}/include \
291         --libdir=%{_libdir}/%{name} \
292         --enable-ipv6 \
293         %{?with_static_libs:--enable-static}
294 cd ..
295 %endif
296 %if %{without system_ortp}
297 cd mediastreamer2
298 %configure \
299         --includedir=%{_libdir}/%{name}/include \
300         --libdir=%{_libdir}/%{name} \
301         --disable-libv4l \
302         %{?with_static_libs:--enable-static}
303 cd ..
304 %endif
305
306 %{__make} \
307         GITDESCRIBE=/bin/true \
308         GIT_TAG=%{version}
309
310 # disable installation of HTML docs (will be packaged as %doc)
311 %{__tar} --delete -f coreapi/help/doc/doxygen/html/html.tar --wildcards '*'
312 %{__tar} --delete -f coreapi/help/doc/doxygen/xml/xml.tar --wildcards '*'
313
314 %install
315 rm -rf $RPM_BUILD_ROOT
316 install -d $RPM_BUILD_ROOT%{_desktopdir} \
317         $RPM_BUILD_ROOT%{_pixmapsdir}
318
319 %{__make} install \
320         GITDESCRIBE=/bin/true \
321         GIT_TAG=%{version} \
322         DESTDIR=$RPM_BUILD_ROOT \
323         tuto_DATA=
324
325 # obsoleted by pkg-config
326 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblinphone*.la
327 %if %{without system_mediastreamer} || %{without system_ortp}
328 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
329 %endif
330
331 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
332
333 %{!?with_system_mediastreamer:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mediastreamer}
334 %{!?with_system_ortp:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp}
335
336 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
337
338 # the executable is missing, so the manual is useless
339 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/sipomatic.1*
340 %{__rm} $RPM_BUILD_ROOT%{_mandir}/cs/man1/sipomatic.1*
341
342 # some tests
343 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
344 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/liblinphone_tester
345
346 %find_lang %{name} --with-gnome --all-name
347
348 %clean
349 rm -rf $RPM_BUILD_ROOT
350
351 %if %{without system_mediastreamer} || %{without system_ortp}
352 %post   libs
353 /sbin/ldconfig %{_libdir}/%{name}
354 %else
355 %post   libs -p /sbin/ldconfig
356 %endif
357
358 %postun libs -p /sbin/ldconfig
359
360 %post   c++ -p /sbin/ldconfig
361 %postun c++ -p /sbin/ldconfig
362
363 %files -f %{name}.lang
364 %defattr(644,root,root,755)
365 %doc AUTHORS BUGS ChangeLog NEWS README.md TODO
366 %attr(755,root,root) %{_bindir}/liblinphone_tester
367 %attr(755,root,root) %{_bindir}/linphone
368 %attr(755,root,root) %{_bindir}/linphone-daemon
369 %attr(755,root,root) %{_bindir}/linphone-daemon-pipetest
370 %attr(755,root,root) %{_bindir}/lp-autoanswer
371 %attr(755,root,root) %{_bindir}/lp-sendmsg
372 %attr(755,root,root) %{_bindir}/lp-test-ecc
373 %{_desktopdir}/audio-assistant.desktop
374 %{_desktopdir}/linphone.desktop
375 %{_pixmapsdir}/linphone.png
376 %{_pixmapsdir}/linphone
377 %{_iconsdir}/hicolor/48x48/actions/linphone-*.png
378 %{_iconsdir}/hicolor/48x48/apps/linphone.png
379 %{_iconsdir}/hicolor/48x48/status/linphone-*.png
380 %{_iconsdir}/hicolor/scalable/actions/linphone-*.svg
381 %{_iconsdir}/hicolor/scalable/status/linphone-*.svg
382 %{_datadir}/appdata/linphone.appdata.xml
383 %{_datadir}/linphone
384 %{_mandir}/man1/linphone.1*
385 %lang(cs) %{_mandir}/cs/man1/linphone.1*
386
387 %files -n linphonec
388 %defattr(644,root,root,755)
389 %doc AUTHORS BUGS ChangeLog NEWS README.md TODO
390 %attr(755,root,root) %{_bindir}/linphonec
391 %attr(755,root,root) %{_bindir}/linphonecsh
392 %{_mandir}/man1/linphonec.1*
393 %{_mandir}/man1/linphonecsh.1*
394 %lang(cs) %{_mandir}/cs/man1/linphonec.1*
395
396 %files libs
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/liblinphone.so.*.*.*
399 %attr(755,root,root) %ghost %{_libdir}/liblinphone.so.9
400 %attr(755,root,root) %{_libdir}/liblinphonetester.so.*.*.*
401 %attr(755,root,root) %ghost %{_libdir}/liblinphonetester.so.0
402 %if %{without system_mediastreamer} || %{without system_ortp}
403 %dir %{_libdir}/%{name}
404 %endif
405 %if %{without system_mediastreamer}
406 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so.*.*.*
407 %attr(755,root,root) %ghost %{_libdir}/%{name}/libmediastreamer.so.?
408 %{_libdir}/%{name}/mediastream
409 %endif
410 %if %{without system_ortp}
411 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
412 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
413 %endif
414 %{_datadir}/sounds/linphone
415
416 %files devel
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/liblinphone.so
419 %attr(755,root,root) %{_libdir}/liblinphonetester.so
420 %{_includedir}/linphone
421 %{_pkgconfigdir}/linphone.pc
422 %if %{without system_mediastreamer} || %{without system_ortp}
423 %dir %{_libdir}/%{name}/include
424 %dir %{_libdir}/%{name}/pkgconfig
425 %endif
426 %if %{without system_mediastreamer}
427 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so
428 %{_libdir}/%{name}/libmediastreamer.la
429 %{_libdir}/%{name}/include/mediastreamer2
430 %{_libdir}/%{name}/pkgconfig/mediastreamer.pc
431 %endif
432 %if %{without system_ortp}
433 %attr(755,root,root) %{_libdir}/%{name}/libortp.so
434 %{_libdir}/%{name}/libortp.la
435 %{_libdir}/%{name}/include/ortp
436 %{_libdir}/%{name}/pkgconfig/ortp.pc
437 %endif
438
439 %if %{with static_libs}
440 %files static
441 %defattr(644,root,root,755)
442 %{_libdir}/liblinphone.a
443 %{_libdir}/liblinphonetester.a
444 %if %{without system_mediastreamer}
445 %{_libdir}/%{name}/libmediastreamer.a
446 %endif
447 %if %{without system_ortp}
448 %{_libdir}/%{name}/libortp.a
449 %endif
450 %endif
451
452 %files apidocs
453 %defattr(644,root,root,755)
454 %doc coreapi/help/doc/doxygen/html/{*.css,*.html,*.js,*.png}
455
456 %files c++
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/liblinphone++.so.*.*.*
459 %attr(755,root,root) %ghost %{_libdir}/liblinphone++.so.9
460
461 %files c++-devel
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/liblinphone++.so
464 %{_includedir}/linphone++
465 %{_pkgconfigdir}/linphone++.pc
466
467 %if %{with static_libs}
468 %files c++-static
469 %defattr(644,root,root,755)
470 %{_libdir}/liblinphone++.a
471 %endif
This page took 0.080174 seconds and 3 git commands to generate.