]> git.pld-linux.org Git - packages/linphone.git/blob - linphone.spec
- rediff patches
[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:        8
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.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
71 %endif
72 Requires:       %{name}-libs = %{version}-%{release}
73 Requires:       libnotify >= 0.7.0
74 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76 %if %{without system_ortp}
77 %define         _noautoreq_1    libortp\.so.*
78 %endif
79 %if %{without system_mediastreamer}
80 %define         _noautoreq_2    libmediastreamer\.so.*
81 %endif
82
83 %define         _noautoreq      %{?_noautoreq_1} %{?_noautoreq_2}
84 %define         _noautoprov     %{?_noautoreq}
85
86 %define         filterout       -Werror=format-security
87
88 %description
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.
92
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
99   Licence.
100 - Linphone is documented: there is a complete user manual readable
101   from the application that explains you all you need to know.
102
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.
106
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.
114
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}
120
121 %description -n linphonec
122 Linphonec is the console version of originally GNOME Internet phone
123 Linphone.
124
125 %description -n linphonec -l pl.UTF-8
126 Linphonec to konsolowa wersja telefonu internetowego Linphone
127 pochodzącego z GNOME.
128
129 %package libs
130 Summary:        Linphone libraries
131 Summary(pl.UTF-8):      Biblioteki Linphone
132 Group:          Libraries
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
143
144 %description libs
145 Linphone libraries.
146
147 %description libs -l pl.UTF-8
148 Biblioteki Linphone.
149
150 %package devel
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
170 %endif
171
172 %description devel
173 Development files for the Linphone Internet Phone.
174
175 %description devel -l pl.UTF-8
176 Pliki dla programistów używających telefonu internetowego Linphone.
177
178 %package static
179 Summary:        Linphone static libraries
180 Summary(pl.UTF-8):      Statyczne biblioteki Linphone
181 Group:          Development/Libraries
182 Requires:       %{name}-devel = %{version}-%{release}
183
184 %description static
185 Static version of Linphone libraries.
186
187 %description static -l pl.UTF-8
188 Statyczne wersje bibliotek Linphone.
189
190 %package apidocs
191 Summary:        API documentation for Linphone library
192 Summary(pl.UTF-8):      Dokumentacja API biblioteki Linphone
193 Group:          Documentation
194
195 %description apidocs
196 API documentation for Linphone library.
197
198 %description apidocs -l pl.UTF-8
199 Dokumentacja API biblioteki Linphone.
200
201 %package c++
202 Summary:        C++ wrapper for Linphone library
203 Summary(pl.UTF-8):      Interfejs C++ do biblioteki Linphone
204 Group:          Libraries
205 Requires:       %{name}-libs = %{version}-%{release}
206
207 %description c++
208 C++ wrapper for Linphone library.
209
210 %description c++ -l pl.UTF-8
211 Interfejs C++ do biblioteki Linphone.
212
213 %package c++-devel
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}
219
220 %description c++-devel
221 Headers for liblinphone++ library.
222
223 %description c++-devel -l pl.UTF-8
224 Pliki nagłówkowe biblioteki liblinphone++.
225
226 %package c++-static
227 Summary:        Static liblinphone++ library
228 Summary(pl.UTF-8):      Statyczna biblioteka liblinphone++
229 Group:          Development/Libraries
230 Requires:       %{name}-c++-devel = %{version}-%{release}
231
232 %description c++-static
233 Static liblinphone++ library.
234
235 %description c++-static -l pl.UTF-8
236 Statyczna biblioteka liblinphone++.
237
238 %prep
239 %setup -q
240 %patch0 -p1
241 %patch1 -p1
242 %patch2 -p1
243 %patch3 -p1
244
245 [ ! -e gitversion.h ] && echo '#define LIBLINPHONE_GIT_VERSION "%{version}"' > coreapi/gitversion.h
246
247 %build
248 %{__gettextize}
249 %{__intltoolize}
250 %{__libtoolize}
251 %{__aclocal} -I m4
252 %{__autoconf}
253 %{__autoheader}
254 %{__automake}
255 %if %{without system_ortp}
256 cd oRTP
257 %{__libtoolize}
258 %{__aclocal}
259 %{__autoconf}
260 %{__autoheader}
261 %{__automake}
262 cd ..
263 %endif
264 %if %{without system_ortp}
265 cd mediastreamer2
266 %{__libtoolize}
267 %{__aclocal}
268 %{__autoconf}
269 %{__autoheader}
270 %{__automake}
271 cd ..
272 %endif
273
274 %configure \
275         --with-html-dir=%{_gtkdocdir} \
276         %{?with_system_mediastreamer:--enable-external-mediastreamer} \
277         %{?with_system_ortp:--enable-external-ortp} \
278         --enable-ipv6 \
279         %{?with_ldap:--enable-ldap} \
280         --disable-silent-rules \
281         %{?with_openssl:--enable-ssl} \
282         %{?with_static_libs:--enable-static} \
283         --disable-strict \
284         %{!?with_zrtp:--disable-zrtp}
285
286 # although main configure already calls {oRTP,mediastreamer2}/configure,
287 # reconfigure them with different dirs
288 %if %{without system_ortp}
289 cd oRTP
290 %configure \
291         --includedir=%{_libdir}/%{name}/include \
292         --libdir=%{_libdir}/%{name} \
293         --enable-ipv6 \
294         %{?with_static_libs:--enable-static}
295 cd ..
296 %endif
297 %if %{without system_ortp}
298 cd mediastreamer2
299 %configure \
300         --includedir=%{_libdir}/%{name}/include \
301         --libdir=%{_libdir}/%{name} \
302         --disable-libv4l \
303         %{?with_static_libs:--enable-static}
304 cd ..
305 %endif
306
307 %{__make} \
308         GITDESCRIBE=/bin/true \
309         GIT_TAG=%{version}
310
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 '*'
314
315 %install
316 rm -rf $RPM_BUILD_ROOT
317 install -d $RPM_BUILD_ROOT%{_desktopdir} \
318         $RPM_BUILD_ROOT%{_pixmapsdir}
319
320 %{__make} install \
321         GITDESCRIBE=/bin/true \
322         GIT_TAG=%{version} \
323         DESTDIR=$RPM_BUILD_ROOT \
324         tuto_DATA=
325
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
330 %endif
331
332 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
333
334 %{!?with_system_mediastreamer:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mediastreamer}
335 %{!?with_system_ortp:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp}
336
337 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
338
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*
342
343 # some tests
344 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
345 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/liblinphone_tester
346
347 %find_lang %{name} --with-gnome --all-name
348
349 %clean
350 rm -rf $RPM_BUILD_ROOT
351
352 %if %{without system_mediastreamer} || %{without system_ortp}
353 %post   libs
354 /sbin/ldconfig %{_libdir}/%{name}
355 %else
356 %post   libs -p /sbin/ldconfig
357 %endif
358
359 %postun libs -p /sbin/ldconfig
360
361 %post   c++ -p /sbin/ldconfig
362 %postun c++ -p /sbin/ldconfig
363
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
384 %{_datadir}/linphone
385 %{_mandir}/man1/linphone.1*
386 %lang(cs) %{_mandir}/cs/man1/linphone.1*
387
388 %files -n linphonec
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*
396
397 %files libs
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}
405 %endif
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
410 %endif
411 %if %{without system_ortp}
412 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
413 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
414 %endif
415 %{_datadir}/sounds/linphone
416
417 %files devel
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
426 %endif
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
432 %endif
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
438 %endif
439
440 %if %{with static_libs}
441 %files static
442 %defattr(644,root,root,755)
443 %{_libdir}/liblinphone.a
444 %{_libdir}/liblinphonetester.a
445 %if %{without system_mediastreamer}
446 %{_libdir}/%{name}/libmediastreamer.a
447 %endif
448 %if %{without system_ortp}
449 %{_libdir}/%{name}/libortp.a
450 %endif
451 %endif
452
453 %files apidocs
454 %defattr(644,root,root,755)
455 %doc coreapi/help/doc/doxygen/html/{*.css,*.html,*.js,*.png}
456
457 %files c++
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/liblinphone++.so.*.*.*
460 %attr(755,root,root) %ghost %{_libdir}/liblinphone++.so.9
461
462 %files c++-devel
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_libdir}/liblinphone++.so
465 %{_includedir}/linphone++
466 %{_pkgconfigdir}/linphone++.pc
467
468 %if %{with static_libs}
469 %files c++-static
470 %defattr(644,root,root,755)
471 %{_libdir}/liblinphone++.a
472 %endif
This page took 0.057577 seconds and 3 git commands to generate.