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.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
73 Requires: %{name}-libs = %{version}-%{release}
74 Requires: libnotify >= 0.7.0
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 %if %{without system_ortp}
78 %define _noautoreq_1 libortp\.so.*
80 %if %{without system_mediastreamer}
81 %define _noautoreq_2 libmediastreamer\.so.*
84 %define _noautoreq %{?_noautoreq_1} %{?_noautoreq_2}
85 %define _noautoprov %{?_noautoreq}
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.
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
99 - Linphone is documented: there is a complete user manual readable
100 from the application that explains you all you need to know.
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.
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.
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}
120 %description -n linphonec
121 Linphonec is the console version of originally GNOME Internet phone
124 %description -n linphonec -l pl.UTF-8
125 Linphonec to konsolowa wersja telefonu internetowego Linphone
126 pochodzącego z GNOME.
129 Summary: Linphone libraries
130 Summary(pl.UTF-8): Biblioteki Linphone
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
146 %description libs -l pl.UTF-8
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
172 Development files for the Linphone Internet Phone.
174 %description devel -l pl.UTF-8
175 Pliki dla programistów używających telefonu internetowego Linphone.
178 Summary: Linphone static libraries
179 Summary(pl.UTF-8): Statyczne biblioteki Linphone
180 Group: Development/Libraries
181 Requires: %{name}-devel = %{version}-%{release}
184 Static version of Linphone libraries.
186 %description static -l pl.UTF-8
187 Statyczne wersje bibliotek Linphone.
190 Summary: API documentation for Linphone library
191 Summary(pl.UTF-8): Dokumentacja API biblioteki Linphone
195 API documentation for Linphone library.
197 %description apidocs -l pl.UTF-8
198 Dokumentacja API biblioteki Linphone.
201 Summary: C++ wrapper for Linphone library
202 Summary(pl.UTF-8): Interfejs C++ do biblioteki Linphone
204 Requires: %{name}-libs = %{version}-%{release}
207 C++ wrapper for Linphone library.
209 %description c++ -l pl.UTF-8
210 Interfejs C++ do biblioteki Linphone.
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}
219 %description c++-devel
220 Headers for liblinphone++ library.
222 %description c++-devel -l pl.UTF-8
223 Pliki nagłówkowe biblioteki liblinphone++.
226 Summary: Static liblinphone++ library
227 Summary(pl.UTF-8): Statyczna biblioteka liblinphone++
228 Group: Development/Libraries
229 Requires: %{name}-c++-devel = %{version}-%{release}
231 %description c++-static
232 Static liblinphone++ library.
234 %description c++-static -l pl.UTF-8
235 Statyczna biblioteka liblinphone++.
244 [ ! -e gitversion.h ] && echo '#define LIBLINPHONE_GIT_VERSION "%{version}"' > coreapi/gitversion.h
254 %if %{without system_ortp}
263 %if %{without system_ortp}
274 --with-html-dir=%{_gtkdocdir} \
275 %{?with_system_mediastreamer:--enable-external-mediastreamer} \
276 %{?with_system_ortp:--enable-external-ortp} \
278 %{?with_ldap:--enable-ldap} \
279 --disable-silent-rules \
280 %{?with_openssl:--enable-ssl} \
281 %{?with_static_libs:--enable-static} \
283 %{!?with_zrtp:--disable-zrtp}
285 # although main configure already calls {oRTP,mediastreamer2}/configure,
286 # reconfigure them with different dirs
287 %if %{without system_ortp}
290 --includedir=%{_libdir}/%{name}/include \
291 --libdir=%{_libdir}/%{name} \
293 %{?with_static_libs:--enable-static}
296 %if %{without system_ortp}
299 --includedir=%{_libdir}/%{name}/include \
300 --libdir=%{_libdir}/%{name} \
302 %{?with_static_libs:--enable-static}
307 GITDESCRIBE=/bin/true \
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 '*'
315 rm -rf $RPM_BUILD_ROOT
316 install -d $RPM_BUILD_ROOT%{_desktopdir} \
317 $RPM_BUILD_ROOT%{_pixmapsdir}
320 GITDESCRIBE=/bin/true \
322 DESTDIR=$RPM_BUILD_ROOT \
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
331 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
333 %{!?with_system_mediastreamer:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mediastreamer}
334 %{!?with_system_ortp:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp}
336 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
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*
343 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
344 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/liblinphone_tester
346 %find_lang %{name} --with-gnome --all-name
349 rm -rf $RPM_BUILD_ROOT
351 %if %{without system_mediastreamer} || %{without system_ortp}
353 /sbin/ldconfig %{_libdir}/%{name}
355 %post libs -p /sbin/ldconfig
358 %postun libs -p /sbin/ldconfig
360 %post c++ -p /sbin/ldconfig
361 %postun c++ -p /sbin/ldconfig
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
384 %{_mandir}/man1/linphone.1*
385 %lang(cs) %{_mandir}/cs/man1/linphone.1*
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*
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}
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
410 %if %{without system_ortp}
411 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
412 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
414 %{_datadir}/sounds/linphone
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
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
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
439 %if %{with static_libs}
441 %defattr(644,root,root,755)
442 %{_libdir}/liblinphone.a
443 %{_libdir}/liblinphonetester.a
444 %if %{without system_mediastreamer}
445 %{_libdir}/%{name}/libmediastreamer.a
447 %if %{without system_ortp}
448 %{_libdir}/%{name}/libortp.a
453 %defattr(644,root,root,755)
454 %doc coreapi/help/doc/doxygen/html/{*.css,*.html,*.js,*.png}
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/liblinphone++.so.*.*.*
459 %attr(755,root,root) %ghost %{_libdir}/liblinphone++.so.9
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/liblinphone++.so
464 %{_includedir}/linphone++
465 %{_pkgconfigdir}/linphone++.pc
467 %if %{with static_libs}
469 %defattr(644,root,root,755)
470 %{_libdir}/liblinphone++.a