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!
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
19 Summary: Linphone Internet Phone
20 Summary(pl.UTF-8): Linphone - telefon internetowy
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
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.6
49 BuildRequires: libxml2-devel >= 2.0
50 %{?with_system_mediastreamer:BuildRequires: mediastreamer-devel >= 2.12.1}
51 BuildRequires: ncurses-devel
52 %{?with_ldap:BuildRequires: openldap-devel}
53 %{?with_openssl:BuildRequires: openssl-devel >= 0.9.8}
54 %{?with_system_ortp:BuildRequires: ortp-devel >= 0.24.0}
55 BuildRequires: pkgconfig
56 BuildRequires: polarssl-devel >= 1.3
57 # to generate C++ wrappers
58 BuildRequires: python-pystache
59 BuildRequires: readline-devel
60 BuildRequires: rpmbuild(macros) >= 1.98
61 BuildRequires: speex-devel >= 1:1.1.6
62 BuildRequires: sqlite3-devel >= 3.7.0
63 BuildRequires: udev-devel
64 BuildRequires: xorg-lib-libX11-devel
65 BuildRequires: xorg-lib-libXv-devel
66 BuildRequires: zlib-devel >= 1.2.3
67 %if %{without system_mediastreamer}
68 BuildRequires: libgsm-devel >= 1.0.10
69 BuildRequires: pulseaudio-devel
70 BuildRequires: speexdsp-devel >= 1.2-beta3
72 Requires: %{name}-libs = %{version}-%{release}
73 Requires: libnotify >= 0.7.0
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 %if %{without system_ortp}
77 %define _noautoreq_1 libortp\.so.*
79 %if %{without system_mediastreamer}
80 %define _noautoreq_2 libmediastreamer\.so.*
83 %define _noautoreq %{?_noautoreq_1} %{?_noautoreq_2}
84 %define _noautoprov %{?_noautoreq}
86 %define filterout -Werror=format-security
89 Linphone is a web phone: it let you phone to your friends anywhere in
90 the whole world, freely, simply by using the internet. The cost of the
91 phone call is the cost that you spend connected to the internet.
93 Here are the main features of linphone:
94 - Works with the GNOME Desktop under linux.
95 - Works as simply as a cellular phone. Two buttons, no more.
96 - Understands the SIP protocol.
97 - You just require a soundcard to use linphone.
98 - Linphone is free software, released under the General Public
100 - Linphone is documented: there is a complete user manual readable
101 from the application that explains you all you need to know.
103 %description -l pl.UTF-8
104 Linphone to telefon internetowy - pozwala dzwonić do znajomych na
105 całym świecie bez dodatkowych opłat, używając tylko Internetu.
107 Główne cechy linphone:
108 - działanie ze środowiskiem GNOME
109 - naśladowanie prostego telefonu komórkowego - tylko dwa przyciski
110 - obsługa protokołu SIP
111 - wymaga karty dźwiękowej
112 - jest wolnodostępnym oprogramowaniem (na licencji GPL)
113 - ma dokumentację: pełny podręcznik dostępny z aplikacji.
115 %package -n linphonec
116 Summary: Linphone Internet Phone console interface
117 Summary(pl.UTF-8): Linphone - telefon internetowy, interfejs konsolowy
118 Group: Applications/Communications
119 Requires: %{name}-libs = %{version}-%{release}
121 %description -n linphonec
122 Linphonec is the console version of originally GNOME Internet phone
125 %description -n linphonec -l pl.UTF-8
126 Linphonec to konsolowa wersja telefonu internetowego Linphone
127 pochodzącego z GNOME.
130 Summary: Linphone libraries
131 Summary(pl.UTF-8): Biblioteki Linphone
133 Requires(post,postun): /sbin/ldconfig
134 Requires: bctoolbox >= 0.0.3
135 Requires: belle-sip >= 1.5.0
136 %{?with_zrtp:Requires: bzrtp >= 1.0.0}
137 Requires: glib2 >= 1:2.26.0
138 Requires: gtk+2 >= 2:2.22.0
139 %{?with_system_mediastreamer:Requires: mediastreamer >= 2.11.0}
140 %{?with_system_ortp:Requires: ortp >= 0.24.0}
141 Requires: sqlite3 >= 3.7.0
142 Requires: zlib >= 1.2.3
147 %description libs -l pl.UTF-8
151 Summary: Linphone Internet Phone - header files
152 Summary(pl.UTF-8): Telefon internetowy Linphone - pliki nagłówkowe
153 Group: Development/Libraries
154 Requires: %{name}-libs = %{version}-%{release}
155 Requires: bctoolbox-devel >= 0.0.3
156 Requires: belle-sip-devel >= 1.5.0
157 %{?with_zrtp:Requires: bzrtp-devel >= 1.0.0}
158 Requires: glib2-devel >= 1:2.26.0
159 Requires: gtk+2-devel >= 2:2.22.0
160 Requires: libstdc++-devel
161 Requires: libxml2-devel >= 2.0
162 %{?with_system_mediastreamer:Requires: mediastreamer-devel >= 2.11.0}
163 %{?with_ldap:Requires: openldap-devel}
164 %{?with_system_ortp:Requires: ortp-devel >= 0.24.0}
165 Requires: sqlite3-devel >= 3.7.0
166 Requires: zlib-devel >= 1.2.3
167 %if %{without system_mediastreamer}
168 Requires: libgsm-devel >= 1.0.10
169 Requires: speexdsp-devel >= 1.2-beta3
173 Development files for the Linphone Internet Phone.
175 %description devel -l pl.UTF-8
176 Pliki dla programistów używających telefonu internetowego Linphone.
179 Summary: Linphone static libraries
180 Summary(pl.UTF-8): Statyczne biblioteki Linphone
181 Group: Development/Libraries
182 Requires: %{name}-devel = %{version}-%{release}
185 Static version of Linphone libraries.
187 %description static -l pl.UTF-8
188 Statyczne wersje bibliotek Linphone.
191 Summary: API documentation for Linphone library
192 Summary(pl.UTF-8): Dokumentacja API biblioteki Linphone
196 API documentation for Linphone library.
198 %description apidocs -l pl.UTF-8
199 Dokumentacja API biblioteki Linphone.
202 Summary: C++ wrapper for Linphone library
203 Summary(pl.UTF-8): Interfejs C++ do biblioteki Linphone
205 Requires: %{name}-libs = %{version}-%{release}
208 C++ wrapper for Linphone library.
210 %description c++ -l pl.UTF-8
211 Interfejs C++ do biblioteki Linphone.
214 Summary: Headers for liblinphone++ library
215 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki liblinphone++
216 Group: Development/Libraries
217 Requires: %{name}-c++ = %{version}-%{release}
218 Requires: %{name}-devel = %{version}-%{release}
220 %description c++-devel
221 Headers for liblinphone++ library.
223 %description c++-devel -l pl.UTF-8
224 Pliki nagłówkowe biblioteki liblinphone++.
227 Summary: Static liblinphone++ library
228 Summary(pl.UTF-8): Statyczna biblioteka liblinphone++
229 Group: Development/Libraries
230 Requires: %{name}-c++-devel = %{version}-%{release}
232 %description c++-static
233 Static liblinphone++ library.
235 %description c++-static -l pl.UTF-8
236 Statyczna biblioteka liblinphone++.
245 [ ! -e gitversion.h ] && echo '#define LIBLINPHONE_GIT_VERSION "%{version}"' > coreapi/gitversion.h
255 %if %{without system_ortp}
264 %if %{without system_ortp}
275 --with-html-dir=%{_gtkdocdir} \
276 %{?with_system_mediastreamer:--enable-external-mediastreamer} \
277 %{?with_system_ortp:--enable-external-ortp} \
279 %{?with_ldap:--enable-ldap} \
280 --disable-silent-rules \
281 %{?with_openssl:--enable-ssl} \
282 %{?with_static_libs:--enable-static} \
284 %{!?with_zrtp:--disable-zrtp}
286 # although main configure already calls {oRTP,mediastreamer2}/configure,
287 # reconfigure them with different dirs
288 %if %{without system_ortp}
291 --includedir=%{_libdir}/%{name}/include \
292 --libdir=%{_libdir}/%{name} \
294 %{?with_static_libs:--enable-static}
297 %if %{without system_ortp}
300 --includedir=%{_libdir}/%{name}/include \
301 --libdir=%{_libdir}/%{name} \
303 %{?with_static_libs:--enable-static}
308 GITDESCRIBE=/bin/true \
311 # disable installation of HTML docs (will be packaged as %doc)
312 %{__tar} --delete -f coreapi/help/doc/doxygen/html/html.tar --wildcards '*'
313 %{__tar} --delete -f coreapi/help/doc/doxygen/xml/xml.tar --wildcards '*'
316 rm -rf $RPM_BUILD_ROOT
317 install -d $RPM_BUILD_ROOT%{_desktopdir} \
318 $RPM_BUILD_ROOT%{_pixmapsdir}
321 GITDESCRIBE=/bin/true \
323 DESTDIR=$RPM_BUILD_ROOT \
326 # obsoleted by pkg-config
327 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblinphone*.la
328 %if %{without system_mediastreamer} || %{without system_ortp}
329 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
332 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
334 %{!?with_system_mediastreamer:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mediastreamer}
335 %{!?with_system_ortp:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp}
337 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
339 # the executable is missing, so the manual is useless
340 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/sipomatic.1*
341 %{__rm} $RPM_BUILD_ROOT%{_mandir}/cs/man1/sipomatic.1*
344 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
345 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/liblinphone_tester
347 %find_lang %{name} --with-gnome --all-name
350 rm -rf $RPM_BUILD_ROOT
352 %if %{without system_mediastreamer} || %{without system_ortp}
354 /sbin/ldconfig %{_libdir}/%{name}
356 %post libs -p /sbin/ldconfig
359 %postun libs -p /sbin/ldconfig
361 %post c++ -p /sbin/ldconfig
362 %postun c++ -p /sbin/ldconfig
364 %files -f %{name}.lang
365 %defattr(644,root,root,755)
366 %doc AUTHORS BUGS ChangeLog NEWS README.md TODO
367 %attr(755,root,root) %{_bindir}/liblinphone_tester
368 %attr(755,root,root) %{_bindir}/linphone
369 %attr(755,root,root) %{_bindir}/linphone-daemon
370 %attr(755,root,root) %{_bindir}/linphone-daemon-pipetest
371 %attr(755,root,root) %{_bindir}/lp-autoanswer
372 %attr(755,root,root) %{_bindir}/lp-sendmsg
373 %attr(755,root,root) %{_bindir}/lp-test-ecc
374 %{_desktopdir}/audio-assistant.desktop
375 %{_desktopdir}/linphone.desktop
376 %{_pixmapsdir}/linphone.png
377 %{_pixmapsdir}/linphone
378 %{_iconsdir}/hicolor/48x48/actions/linphone-*.png
379 %{_iconsdir}/hicolor/48x48/apps/linphone.png
380 %{_iconsdir}/hicolor/48x48/status/linphone-*.png
381 %{_iconsdir}/hicolor/scalable/actions/linphone-*.svg
382 %{_iconsdir}/hicolor/scalable/status/linphone-*.svg
383 %{_datadir}/appdata/linphone.appdata.xml
385 %{_mandir}/man1/linphone.1*
386 %lang(cs) %{_mandir}/cs/man1/linphone.1*
389 %defattr(644,root,root,755)
390 %doc AUTHORS BUGS ChangeLog NEWS README.md TODO
391 %attr(755,root,root) %{_bindir}/linphonec
392 %attr(755,root,root) %{_bindir}/linphonecsh
393 %{_mandir}/man1/linphonec.1*
394 %{_mandir}/man1/linphonecsh.1*
395 %lang(cs) %{_mandir}/cs/man1/linphonec.1*
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/liblinphone.so.*.*.*
400 %attr(755,root,root) %ghost %{_libdir}/liblinphone.so.9
401 %attr(755,root,root) %{_libdir}/liblinphonetester.so.*.*.*
402 %attr(755,root,root) %ghost %{_libdir}/liblinphonetester.so.0
403 %if %{without system_mediastreamer} || %{without system_ortp}
404 %dir %{_libdir}/%{name}
406 %if %{without system_mediastreamer}
407 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so.*.*.*
408 %attr(755,root,root) %ghost %{_libdir}/%{name}/libmediastreamer.so.?
409 %{_libdir}/%{name}/mediastream
411 %if %{without system_ortp}
412 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
413 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
415 %{_datadir}/sounds/linphone
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/liblinphone.so
420 %attr(755,root,root) %{_libdir}/liblinphonetester.so
421 %{_includedir}/linphone
422 %{_pkgconfigdir}/linphone.pc
423 %if %{without system_mediastreamer} || %{without system_ortp}
424 %dir %{_libdir}/%{name}/include
425 %dir %{_libdir}/%{name}/pkgconfig
427 %if %{without system_mediastreamer}
428 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so
429 %{_libdir}/%{name}/libmediastreamer.la
430 %{_libdir}/%{name}/include/mediastreamer2
431 %{_libdir}/%{name}/pkgconfig/mediastreamer.pc
433 %if %{without system_ortp}
434 %attr(755,root,root) %{_libdir}/%{name}/libortp.so
435 %{_libdir}/%{name}/libortp.la
436 %{_libdir}/%{name}/include/ortp
437 %{_libdir}/%{name}/pkgconfig/ortp.pc
440 %if %{with static_libs}
442 %defattr(644,root,root,755)
443 %{_libdir}/liblinphone.a
444 %{_libdir}/liblinphonetester.a
445 %if %{without system_mediastreamer}
446 %{_libdir}/%{name}/libmediastreamer.a
448 %if %{without system_ortp}
449 %{_libdir}/%{name}/libortp.a
454 %defattr(644,root,root,755)
455 %doc coreapi/help/doc/doxygen/html/{*.css,*.html,*.js,*.png}
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/liblinphone++.so.*.*.*
460 %attr(755,root,root) %ghost %{_libdir}/liblinphone++.so.9
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_libdir}/liblinphone++.so
465 %{_includedir}/linphone++
466 %{_pkgconfigdir}/linphone++.pc
468 %if %{with static_libs}
470 %defattr(644,root,root,755)
471 %{_libdir}/liblinphone++.a