]> git.pld-linux.org Git - packages/linphone.git/blob - linphone.spec
ef0d11162536eb86a4d38fd2396842ecf07e9b68
[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  ldap                    # LDAP support
12 %bcond_without  openssl                 # SSL support
13 %bcond_without  system_ortp             # use custom ortp
14 %bcond_without  system_mediastreamer    # use custom mediastreamer
15
16 Summary:        Linphone Internet Phone
17 Summary(pl.UTF-8):      Linphone - telefon internetowy
18 Name:           linphone
19 Version:        3.7.0
20 Release:        1
21 License:        GPL v2+
22 Group:          Applications/Communications
23 Source0:        http://download-mirror.savannah.gnu.org/releases/linphone/3.7.x/sources/%{name}-%{version}.tar.gz
24 # Source0-md5:  6978492712bdacd452e375254d6033ae
25 Patch0:         %{name}-imgdir.patch
26 Patch1:         %{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 >= 1:1.9
31 BuildRequires:  belle-sip-devel >= 1.3.0
32 %{?with_ldap:BuildRequires:     cyrus-sasl-devel >= 2}
33 BuildRequires:  doxygen
34 BuildRequires:  ffmpeg-devel >= 0.4.5
35 BuildRequires:  gettext-devel
36 BuildRequires:  gnome-common >= 2.8.0
37 BuildRequires:  gtk+2-devel >= 2:2.22.0
38 BuildRequires:  intltool >= 0.40
39 BuildRequires:  libnotify-devel >= 0.7.0
40 BuildRequires:  libsoup-devel >= 2.26
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  libtool >= 2:2
43 BuildRequires:  libupnp-devel < 1.7
44 BuildRequires:  libupnp-devel >= 1.6
45 BuildRequires:  libv4l-devel
46 BuildRequires:  libxml2-devel >= 2.0
47 %{?with_system_mediastreamer:BuildRequires:     mediastreamer-devel >= 2.10.0}
48 BuildRequires:  ncurses-devel
49 %{?with_ldap:BuildRequires:     openldap-devel}
50 %{?with_openssl:BuildRequires:  openssl-devel >= 0.9.8}
51 %{?with_system_ortp:BuildRequires:      ortp-devel >= 0.23.0}
52 BuildRequires:  pkgconfig
53 BuildRequires:  readline-devel
54 BuildRequires:  rpmbuild(macros) >= 1.98
55 BuildRequires:  scrollkeeper
56 BuildRequires:  speex-devel >= 1.1.6
57 BuildRequires:  sqlite3-devel >= 3.7.0
58 %{!?with_system_ortp:BuildRequires:     srtp-devel}
59 BuildRequires:  udev-devel
60 BuildRequires:  xorg-lib-libX11-devel
61 BuildRequires:  xorg-lib-libXv-devel
62 %if %{without system_mediastreamer}
63 BuildRequires:  libgsm-devel >= 1.0.10
64 BuildRequires:  pulseaudio-devel
65 %endif
66 Requires(post,postun):  /usr/bin/scrollkeeper-update
67 Requires:       %{name}-libs = %{version}-%{release}
68 Requires:       gtk+2 >= 2:2.22.0
69 Requires:       libnotify >= 0.7.0
70 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72 %if %{without system_ortp}
73 %define         _noautoreq_1    libortp\.so.*
74 %endif
75 %if %{without system_mediastreamer}
76 %define         _noautoreq_2    libmediastreamer\.so.*
77 %endif
78
79 %define         _noautoreq      %{?_noautoreq_1} %{?_noautoreq_2}
80 %define         _noautoprov     %{?_noautoreq}
81
82 %description
83 Linphone is a web phone: it let you phone to your friends anywhere in
84 the whole world, freely, simply by using the internet. The cost of the
85 phone call is the cost that you spend connected to the internet.
86
87 Here are the main features of linphone:
88 - Works with the GNOME Desktop under linux.
89 - Works as simply as a cellular phone. Two buttons, no more.
90 - Understands the SIP protocol.
91 - You just require a soundcard to use linphone.
92 - Linphone is free software, released under the General Public
93   Licence.
94 - Linphone is documented: there is a complete user manual readable
95   from the application that explains you all you need to know.
96
97 %description -l pl.UTF-8
98 Linphone to telefon internetowy - pozwala dzwonić do znajomych na
99 całym świecie bez dodatkowych opłat, używając tylko Internetu.
100
101 Główne cechy linphone:
102 - działanie ze środowiskiem GNOME
103 - naśladowanie prostego telefonu komórkowego - tylko dwa przyciski
104 - obsługa protokołu SIP
105 - wymaga karty dźwiękowej
106 - jest wolnodostępnym oprogramowaniem (na licencji GPL)
107 - ma dokumentację: pełny podręcznik dostępny z aplikacji.
108
109 %package -n linphonec
110 Summary:        Linphone Internet Phone console interface
111 Summary(pl.UTF-8):      Linphone - telefon internetowy, interfejs konsolowy
112 Group:          Applications/Communications
113 Requires:       %{name}-libs = %{version}-%{release}
114
115 %description -n linphonec
116 Linphonec is the console version of originally GNOME Internet phone
117 Linphone.
118
119 %description -n linphonec -l pl.UTF-8
120 Linphonec to konsolowa wersja telefonu internetowego Linphone
121 pochodzącego z GNOME.
122
123 %package libs
124 Summary:        Linphone libraries
125 Summary(pl.UTF-8):      Biblioteki Linphone
126 Group:          Libraries
127 Requires(post,postun):  /sbin/ldconfig
128 Requires:       belle-sip >= 1.3.0
129 Requires:       libsoup-devel >= 2.26
130 %{?with_system_mediastreamer:Requires:  mediastreamer >= 2.10.0}
131 %{?with_system_ortp:Requires:   ortp >= 0.23.0}
132 Requires:       sqlite3 >= 3.7.0
133
134 %description libs
135 Linphone libraries.
136
137 %description libs -l pl.UTF-8
138 Biblioteki Linphone.
139
140 %package devel
141 Summary:        Linphone Internet Phone - header files
142 Summary(pl.UTF-8):      Telefon internetowy Linphone - pliki nagłówkowe
143 Group:          Development/Libraries
144 Requires:       %{name}-libs = %{version}-%{release}
145 Requires:       alsa-lib-devel >= 0.9.0
146 Requires:       belle-sip-devel >= 1.3.0
147 Requires:       glib2-devel >= 2.0.0
148 Requires:       gtk-doc-common
149 Requires:       libsoup-devel >= 2.26
150 Requires:       libstdc++-devel
151 Requires:       libupnp-devel < 1.7
152 Requires:       libupnp-devel >= 1.6
153 Requires:       libxml2-devel >= 2.0
154 %{?with_system_mediastreamer:Requires:  mediastreamer-devel >= 2.10.0}
155 %{?with_system_ortp:Requires:   ortp-devel >= 0.23.0}
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
191 %build
192 %{__libtoolize}
193 %{__aclocal} -I m4
194 %{__autoconf}
195 %{__autoheader}
196 %{__automake}
197 %if %{without system_ortp}
198 cd oRTP
199 %{__libtoolize}
200 %{__aclocal}
201 %{__autoconf}
202 %{__autoheader}
203 %{__automake}
204 cd ..
205 %endif
206 %if %{without system_ortp}
207 cd mediastreamer2
208 %{__libtoolize}
209 %{__aclocal}
210 %{__autoconf}
211 %{__autoheader}
212 %{__automake}
213 cd ..
214 %endif
215
216 %configure \
217         --with-html-dir=%{_gtkdocdir} \
218         --enable-alsa \
219         %{?with_system_mediastreamer:--enable-external-mediastreamer} \
220         %{?with_system_ortp:--enable-external-ortp} \
221         --enable-ipv6 \
222         %{?with_ldap:--enable-ldap} \
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         GITDESCRIBE=/bin/true \
251         GIT_TAG=%{version}
252
253
254 %install
255 rm -rf $RPM_BUILD_ROOT
256 install -d $RPM_BUILD_ROOT%{_desktopdir} \
257         $RPM_BUILD_ROOT%{_pixmapsdir}
258
259 %{__make} install \
260         GITDESCRIBE=/bin/true \
261         GIT_TAG=%{version} \
262         DESTDIR=$RPM_BUILD_ROOT
263
264 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
265
266 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
267 %{!?with_system_mediastreamer:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mediastreamer}
268 %{!?with_system_ortp:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ortp}
269
270 mv $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
271
272 # the executable is missing, so the manual is useless
273 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/sipomatic.1*
274 %{__rm} $RPM_BUILD_ROOT%{_mandir}/cs/man1/sipomatic.1*
275
276 # some tests
277 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*_test
278
279 install -d $RPM_BUILD_ROOT%{_examplesdir}
280 mv $RPM_BUILD_ROOT%{_datadir}/tutorials/%{name} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
281
282 %find_lang %{name} --with-gnome --all-name
283
284 %clean
285 rm -rf $RPM_BUILD_ROOT
286
287 %post
288 %{_bindir}/scrollkeeper-update
289
290 %if %{without system_mediastreamer} || %{without system_ortp}
291 %post libs
292 /sbin/ldconfig %{_libdir}/%{name}
293 %else
294 %post libs -p /sbin/ldconfig
295 %endif
296
297 %postun
298 %{_bindir}/scrollkeeper-update
299
300 %postun libs -p /sbin/ldconfig
301
302 %files -f %{name}.lang
303 %defattr(644,root,root,755)
304 %doc AUTHORS BUGS ChangeLog NEWS README TODO
305 %attr(755,root,root) %{_bindir}/linphone
306 %{_desktopdir}/linphone.desktop
307 %{_pixmapsdir}/linphone.png
308 %{_pixmapsdir}/linphone
309 %{_datadir}/linphone
310 %{_mandir}/man1/linphone.1*
311 %lang(cs) %{_mandir}/cs/man1/linphone.1*
312
313 %files -n linphonec
314 %defattr(644,root,root,755)
315 %doc AUTHORS BUGS ChangeLog NEWS README TODO
316 %attr(755,root,root) %{_bindir}/linphonec
317 %attr(755,root,root) %{_bindir}/linphonecsh
318 %{_mandir}/man1/linphonec.1*
319 %{_mandir}/man1/linphonecsh.1*
320 %lang(cs) %{_mandir}/cs/man1/linphonec.1*
321
322 %files libs
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/liblinphone.so.*.*.*
325 %attr(755,root,root) %ghost %{_libdir}/liblinphone.so.6
326 %if %{without system_mediastreamer} || %{without system_ortp}
327 %dir %{_libdir}/%{name}
328 %endif
329 %if %{without system_mediastreamer}
330 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so.*.*.*
331 %attr(755,root,root) %ghost %{_libdir}/%{name}/libmediastreamer.so.?
332 %{_libdir}/%{name}/mediastream
333 %endif
334 %if %{without system_ortp}
335 %attr(755,root,root) %{_libdir}/%{name}/libortp.so.*.*.*
336 %attr(755,root,root) %ghost %{_libdir}/%{name}/libortp.so.?
337 %endif
338 %{_datadir}/sounds/linphone
339
340 %files devel
341 %defattr(644,root,root,755)
342 %doc coreapi/help/doc/html
343 %attr(755,root,root) %{_libdir}/liblinphone.so
344 %attr(755,root,root) %{_bindir}/lp-gen-wrappers
345 %{_includedir}/linphone
346 %{_pkgconfigdir}/linphone.pc
347 %{_libdir}/liblinphone.la
348 %if %{without system_mediastreamer} || %{without system_ortp}
349 %dir %{_libdir}/%{name}/include
350 %dir %{_libdir}/%{name}/pkgconfig
351 %endif
352 %if %{without system_mediastreamer}
353 %attr(755,root,root) %{_libdir}/%{name}/libmediastreamer.so
354 %{_libdir}/%{name}/libmediastreamer.la
355 %{_libdir}/%{name}/include/mediastreamer2
356 %{_libdir}/%{name}/pkgconfig/mediastreamer.pc
357 %endif
358 %if %{without system_ortp}
359 %attr(755,root,root) %{_libdir}/%{name}/libortp.so
360 %{_libdir}/%{name}/libortp.la
361 %{_libdir}/%{name}/include/ortp
362 %{_libdir}/%{name}/pkgconfig/ortp.pc
363 %endif
364 %{_examplesdir}/%{name}-%{version}
365
366 %files static
367 %defattr(644,root,root,755)
368 %{_libdir}/liblinphone.a
369 %if %{without system_mediastreamer}
370 %{_libdir}/%{name}/libmediastreamer.a
371 %endif
372 %if %{without system_ortp}
373 %{_libdir}/%{name}/libortp.a
374 %endif
This page took 0.074695 seconds and 2 git commands to generate.