]> git.pld-linux.org Git - packages/linphone.git/blob - linphone.spec
- added sh patch (fixes sqlite3 option with non-bash shells)
[packages/linphone.git] / linphone.spec
1 # TODO:
2 # - --enable-tunnel (BR: pkgconfig(tunnel) >= 0.3.3)
3 # - fill in dependencies for !system_ortp, !system_mediastreamer
4 # - check if all this configure option I've set are really needed
5 # - separate libraries that do not require gnome into subpackages for Jingle support in kopete
6 # - if system_mediastreamerpackages copies for "libmediastreamer.so.1", "libortp.so.8" libraries
7 #   those should be installed to private path and LD_LIBARY_PATH setup with wrappers.
8 #   without doing so do not stbr it to Th!
9 #
10 # Conditional build:
11 %bcond_without  openssl                 # SSL support
12 %bcond_without  system_ortp             # use custom ortp
13 %bcond_without  system_mediastreamer    # use custom mediastreamer
14
15 Summary:        Linphone Internet Phone
16 Summary(pl.UTF-8):      Linphone - telefon internetowy
17 Name:           linphone
18 Version:        3.6.0
19 Release:        1
20 License:        GPL v2+
21 Group:          Applications/Communications
22 Source0:        http://download.savannah.gnu.org/releases/linphone/stable/sources/%{name}-%{version}.tar.gz
23 # Source0-md5:  9a101854bb16034b39096e18c80ceb78
24 Patch0:         %{name}-imgdir.patch
25 Patch1:         %{name}-exosip-4.0.0.patch
26 Patch2:         %{name}-sh.patch
27 URL:            http://www.linphone.org/
28 BuildRequires:  alsa-lib-devel >= 0.9.0
29 BuildRequires:  autoconf >= 2.50
30 BuildRequires:  automake
31 BuildRequires:  doxygen
32 BuildRequires:  ffmpeg-devel >= 0.4.5
33 BuildRequires:  gettext-devel
34 BuildRequires:  gnome-common >= 2.8.0
35 BuildRequires:  gtk+2-devel >= 2:2.22.0
36 BuildRequires:  intltool >= 0.40
37 BuildRequires:  libeXosip2-devel >= 4.0.0
38 BuildRequires:  libnotify-devel >= 0.7.0
39 BuildRequires:  libosip2-devel >= 3.3.0
40 BuildRequires:  libsoup-devel >= 2.26
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  libtool >= 2:2
43 BuildRequires:  libupnp-devel >= 1.6
44 BuildRequires:  libupnp-devel < 1.7
45 BuildRequires:  libv4l-devel
46 BuildRequires:  libxml2-devel >= 2.0
47 %{?with_system_ortp:BuildRequires:      ortp-devel}
48 %{?with_system_mediastreamer:BuildRequires:     mediastreamer-devel >= 2.9.0}
49 BuildRequires:  ncurses-devel
50 %{?with_openssl:BuildRequires:  openssl-devel >= 0.9.8}
51 BuildRequires:  pkgconfig
52 BuildRequires:  readline-devel
53 BuildRequires:  rpmbuild(macros) >= 1.98
54 BuildRequires:  scrollkeeper
55 BuildRequires:  speex-devel >= 1.1.6
56 BuildRequires:  sqlite3-devel >= 3.7.0
57 BuildRequires:  srtp-devel
58 BuildRequires:  udev-devel
59 BuildRequires:  xorg-lib-libX11-devel
60 BuildRequires:  xorg-lib-libXv-devel
61 %if %{without system_mediastreamer}
62 BuildRequires:  libgsm-devel >= 1.0.10
63 BuildRequires:  pulseaudio-devel
64 %endif
65 Requires(post,postun):  /usr/bin/scrollkeeper-update
66 Requires:       %{name}-libs = %{version}-%{release}
67 Requires:       gtk+2 >= 2:2.22.0
68 Requires:       libnotify >= 0.7.0
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 %if %{without system_ortp}
72 %define         _noautoreq_1    libortp\.so.*
73 %endif
74 %if %{without system_mediastreamer}
75 %define         _noautoreq_2    libmediastreamer\.so.*
76 %endif
77
78 %define         _noautoreq      %{?_noautoreq_1} %{?_noautoreq_2}
79 %define         _noautoprov     %{?_noautoreq}
80
81 %description
82 Linphone is a web phone: it let you phone to your friends anywhere in
83 the whole world, freely, simply by using the internet. The cost of the
84 phone call is the cost that you spend connected to the internet.
85
86 Here are the main features of linphone:
87 - Works with the GNOME Desktop under linux.
88 - Works as simply as a cellular phone. Two buttons, no more.
89 - Understands the SIP protocol.
90 - You just require a soundcard to use linphone.
91 - Linphone is free software, released under the General Public
92   Licence.
93 - Linphone is documented: there is a complete user manual readable
94   from the application that explains you all you need to know.
95
96 %description -l pl.UTF-8
97 Linphone to telefon internetowy - pozwala dzwonić do znajomych na
98 całym świecie bez dodatkowych opłat, używając tylko Internetu.
99
100 Główne cechy linphone:
101 - działanie ze środowiskiem GNOME
102 - naśladowanie prostego telefonu komórkowego - tylko dwa przyciski
103 - obsługa protokołu SIP
104 - wymaga karty dźwiękowej
105 - jest wolnodostępnym oprogramowaniem (na licencji GPL)
106 - ma dokumentację: pełny podręcznik dostępny z aplikacji.
107
108 %package -n linphonec
109 Summary:        Linphone Internet Phone console interface
110 Summary(pl.UTF-8):      Linphone - telefon internetowy, interfejs konsolowy
111 Group:          Applications/Communications
112 Requires:       %{name}-libs = %{version}-%{release}
113
114 %description -n linphonec
115 Linphonec is the console version of originally GNOME Internet phone
116 Linphone.
117
118 %description -n linphonec -l pl.UTF-8
119 Linphonec to konsolowa wersja telefonu internetowego Linphone
120 pochodzącego z GNOME.
121
122 %package libs
123 Summary:        Linphone libraries
124 Summary(pl.UTF-8):      Biblioteki Linphone
125 Group:          Libraries
126 Requires(post,postun):  /sbin/ldconfig
127 Requires:       libeXosip2 >= 4.0.0
128 Requires:       libosip2 >= 3.3.0
129 Requires:       libsoup-devel >= 2.26
130 %{?with_system_mediastreamer:Requires:  mediastreamer >= 2.9.0}
131 Requires:       sqlite3 >= 3.7.0
132
133 %description libs
134 Linphone libraries.
135
136 %description libs -l pl.UTF-8
137 Biblioteki Linphone.
138
139 %package devel
140 Summary:        Linphone Internet Phone - header files
141 Summary(pl.UTF-8):      Telefon internetowy Linphone - pliki nagłówkowe
142 Group:          Development/Libraries
143 Requires:       %{name}-libs = %{version}-%{release}
144 Requires:       alsa-lib-devel >= 0.9.0
145 Requires:       glib2-devel >= 2.0.0
146 Requires:       gtk-doc-common
147 Requires:       libeXosip2-devel >= 4.0.0
148 Requires:       libosip2-devel >= 3.3.0
149 Requires:       libsoup-devel >= 2.26
150 Requires:       libstdc++-devel
151 Requires:       libupnp-devel >= 1.6
152 Requires:       libupnp-devel < 1.7
153 Requires:       libxml2-devel >= 2.0
154 %{?with_system_mediastreamer:Requires:  mediastreamer-devel >= 2.9.0}
155 %{?with_system_ortp:Requires:   ortp-devel}
156 Requires:       speex-devel >= 1.1.6
157 Requires:       sqlite3-devel >= 3.7.0
158 Requires:       srtp-devel
159 Requires:       xorg-lib-libX11-devel
160 Requires:       xorg-lib-libXv-devel
161 %if %{without system_mediastreamer}
162 Requires:       libgsm-devel >= 1.0.10
163 %endif
164
165 %description devel
166 Development files for the Linphone Internet Phone.
167
168 %description devel -l pl.UTF-8
169 Pliki dla programistów używających telefonu internetowego Linphone.
170
171 %package static
172 Summary:        Linphone static libraries
173 Summary(pl.UTF-8):      Statyczne biblioteki Linphone
174 Group:          Development/Libraries
175 Requires:       %{name}-devel = %{version}-%{release}
176
177 %description static
178 Static version of Linphone libraries.
179
180 %description static -l pl.UTF-8
181 Statyczne wersje bibliotek Linphone.
182
183 %prep
184 %setup -q
185
186 find '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
187
188 %patch0 -p1
189 %patch1 -p1
190 %patch2 -p1
191
192 %build
193 %{__libtoolize}
194 %{__aclocal} -I m4
195 %{__autoconf}
196 %{__autoheader}
197 %{__automake}
198 %if %{without system_ortp}
199 cd oRTP
200 %{__libtoolize}
201 %{__aclocal}
202 %{__autoconf}
203 %{__autoheader}
204 %{__automake}
205 cd ..
206 %endif
207 %if %{without system_ortp}
208 cd mediastreamer2
209 %{__libtoolize}
210 %{__aclocal}
211 %{__autoconf}
212 %{__autoheader}
213 %{__automake}
214 cd ..
215 %endif
216
217 %configure \
218         --with-html-dir=%{_gtkdocdir} \
219         --enable-alsa \
220         %{?with_system_mediastreamer:--enable-external-mediastreamer} \
221         %{?with_system_ortp:--enable-external-ortp} \
222         --enable-ipv6 \
223         --disable-silent-rules \
224         %{?with_openssl:--enable-ssl} \
225         --enable-static \
226         --disable-strict
227
228 # although main configure already calls {oRTP,mediastreamer2}/configure,
229 # reconfigure them with different dirs
230 %if %{without system_ortp}
231 cd oRTP
232 %configure \
233         --enable-static \
234         --enable-ipv6 \
235         --libdir=%{_libdir}/%{name} \
236         --includedir=%{_libdir}/%{name}/include
237 cd ..
238 %endif
239 %if %{without system_ortp}
240 cd mediastreamer2
241 %configure \
242         --enable-static \
243         --disable-libv4l \
244         --libdir=%{_libdir}/%{name} \
245         --includedir=%{_libdir}/%{name}/include
246 cd ..
247 %endif
248
249 %{__make}
250
251 %install
252 rm -rf $RPM_BUILD_ROOT
253 install -d $RPM_BUILD_ROOT%{_desktopdir} \
254         $RPM_BUILD_ROOT%{_pixmapsdir}
255
256 %{__make} install \
257         DESTDIR=$RPM_BUILD_ROOT
258
259 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
260
261 # kill .desktop in GNOME1-specific location
262 #rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/apps
263
264 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
265 %{!?with_system_mediastreamer:rm -r $RPM_BUILD_ROOT/usr/share/doc/mediastreamer}
266 %{!?with_system_ortp:rm -r $RPM_BUILD_ROOT/usr/share/doc/ortp}
267
268 mv $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
269
270 # the executable is missing, so the manual is useless
271 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/sipomatic.1*
272 %{__rm} $RPM_BUILD_ROOT%{_mandir}/cs/man1/sipomatic.1*
273
274 # some tests
275 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
276
277 %find_lang %{name} --with-gnome --all-name
278
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %post
283 /usr/bin/scrollkeeper-update
284
285 %if %{without system_mediastreamer} || %{without system_ortp}
286 %post libs
287 /sbin/ldconfig %{_libdir}/%{name}
288 %else
289 %post libs -p /sbin/ldconfig
290 %endif
291
292 %postun
293 /usr/bin/scrollkeeper-update
294
295 %postun libs -p /sbin/ldconfig
296
297 %files -f %{name}.lang
298 %defattr(644,root,root,755)
299 %doc AUTHORS BUGS ChangeLog NEWS README TODO
300 %attr(755,root,root) %{_bindir}/linphone
301 %{_desktopdir}/linphone.desktop
302 %{_pixmapsdir}/linphone.png
303 %{_pixmapsdir}/linphone
304 %{_datadir}/linphone
305 %{_mandir}/man1/linphone.1*
306 %lang(cs) %{_mandir}/cs/man1/linphone.1*
307
308 %files -n linphonec
309 %defattr(644,root,root,755)
310 %doc AUTHORS BUGS ChangeLog NEWS README TODO
311 %attr(755,root,root) %{_bindir}/linphonec
312 %attr(755,root,root) %{_bindir}/linphonecsh
313 %{_mandir}/man1/linphonec.1*
314 %{_mandir}/man1/linphonecsh.1*
315 %lang(cs) %{_mandir}/cs/man1/linphonec.1*
316
317 %files libs
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/liblinphone.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/liblinphone.so.5
321 %attr(755,root,root) %{_libdir}/liblpc2xml.so.*.*.*
322 %attr(755,root,root) %ghost %{_libdir}/liblpc2xml.so.0
323 %attr(755,root,root) %{_libdir}/libxml2lpc.so.*.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libxml2lpc.so.0
325 %if %{without system_mediastreamer} || %{without system_ortp}
326 %dir %{_libdir}/%{name}
327 %endif
328 %if %{without system_mediastreamer}
329 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so.*.*.*
330 %attr(755,root,root) %ghost %{_libdir}/%{name}/libmediastreamer.so.?
331 %{_libdir}/%{name}/mediastream
332 %endif
333 %if %{without system_ortp}
334 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
335 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
336 %endif
337 %{_datadir}/sounds/linphone
338
339 %files devel
340 %defattr(644,root,root,755)
341 %doc coreapi/help/doc/html
342 %attr(755,root,root) %{_libdir}/liblinphone.so
343 %attr(755,root,root) %{_libdir}/liblpc2xml.so
344 %attr(755,root,root) %{_libdir}/libxml2lpc.so
345 %{_includedir}/linphone
346 %{_pkgconfigdir}/linphone.pc
347 %{_libdir}/liblinphone.la
348 %{_libdir}/liblpc2xml.la
349 %{_libdir}/libxml2lpc.la
350 %if %{without system_mediastreamer} || %{without system_ortp}
351 %dir %{_libdir}/%{name}/include
352 %dir %{_libdir}/%{name}/pkgconfig
353 %endif
354 %if %{without system_mediastreamer}
355 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so
356 %{_libdir}/%{name}/libmediastreamer.la
357 %{_libdir}/%{name}/include/mediastreamer2
358 %{_libdir}/%{name}/pkgconfig/mediastreamer.pc
359 %endif
360 %if %{without system_ortp}
361 %attr(755,root,root) %{_libdir}/%{name}/libortp.so
362 %{_libdir}/%{name}/libortp.la
363 %{_libdir}/%{name}/include/ortp
364 %{_libdir}/%{name}/pkgconfig/ortp.pc
365 %endif
366
367 %files static
368 %defattr(644,root,root,755)
369 %{_libdir}/liblinphone.a
370 %{_libdir}/liblpc2xml.a
371 %{_libdir}/libxml2lpc.a
372 %if %{without system_mediastreamer}
373 %{_libdir}/%{name}/libmediastreamer.a
374 %endif
375 %if %{without system_ortp}
376 %{_libdir}/%{name}/libortp.a
377 %endif
This page took 0.088505 seconds and 3 git commands to generate.