]> git.pld-linux.org Git - packages/ptlib.git/blob - ptlib.spec
- disable ffmpeg support, rel 2
[packages/ptlib.git] / ptlib.spec
1 #
2 # WARNING: keep compatible with Ekiga releases.
3 #       Recommended versions of ptlib and opal can be found at:
4 #       http://wiki.ekiga.org/index.php/Download_Ekiga_sources
5 #       (for Ekiga 4.0.x it's ptlib 2.10.x + opal 3.10.x)
6 #
7 # Conditional build:
8 %bcond_without  http            # HTTP support
9 %bcond_without  ipv6            # IPv6 support
10 %bcond_without  festival        # Festival TTS support
11 %bcond_without  ldap            # LDAP support
12 %bcond_without  lua             # Lua script support
13 %bcond_with     odbc            # ODBC support
14 %bcond_without  openssl         # openssl support
15 %bcond_without  plugins         # plugins support
16 %bcond_without  resolver        # resolver support
17 %bcond_without  sasl            # SASL support
18 %bcond_without  v8              # V8 Javascript support
19 %bcond_without  video           # video support
20 %bcond_with     esd             # EsounD audio support (obsolete)
21 %bcond_with     avc1394         # AVC1394 video input plugin [requires old libraw1394]
22 %bcond_with     dc1394          # DC1394 video input plugin [requires old libdc1394]
23 %bcond_with     ffmpeg          # FFMPEG support [requires ffmpeg < 5]
24 #
25 %ifnarch %{ix86} %{x8664} %{arm} mips
26 %undefine       with_v8
27 %endif
28 Summary:        Portable Tools Library
29 Summary(pl.UTF-8):      Przenośna biblioteka narzędziowa
30 Name:           ptlib
31 Version:        2.18.8
32 Release:        2
33 Epoch:          1
34 License:        MPL v1.0
35 Group:          Libraries
36 Source0:        http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
37 # Source0-md5:  207f40521cde54a9c4e1e31a9cd8a101
38 Patch0:         %{name}-prefer-gst1.patch
39 Patch1:         %{name}-festival.patch
40 Patch2:         no-ffmpeg.patch
41 # domain suspended (2022.04)
42 #URL:           http://www.opalvoip.org/
43 URL:            https://sourceforge.net/projects/opalvoip/
44 BuildRequires:  ImageMagick-devel
45 %{?with_video:BuildRequires:    SDL-devel}
46 BuildRequires:  autoconf >= 2.71
47 BuildRequires:  automake
48 BuildRequires:  bison
49 %{?with_sasl:BuildRequires:     cyrus-sasl-devel}
50 %{?with_esd:BuildRequires:      esound-devel}
51 BuildRequires:  expat-devel
52 %{?with_festival:BuildRequires: festival-devel}
53 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel}
54 BuildRequires:  flex
55 BuildRequires:  gstreamer-devel >= 1.0
56 %{?with_avc1394:BuildRequires:  libavc1394-devel}
57 %{?with_dc1394:BuildRequires:   libdc1394-devel < 2.0.0}
58 BuildRequires:  libjpeg-devel
59 BuildRequires:  libpcap-devel
60 BuildRequires:  libstdc++-devel >= 6:4.7
61 %{?with_lua:BuildRequires:      lua-devel >= 5.4}
62 BuildRequires:  ncurses-devel
63 %{?with_ldap:BuildRequires:     openldap-devel}
64 %{?with_openssl:BuildRequires:  openssl-devel}
65 BuildRequires:  pkgconfig
66 %{?with_odbc:BuildRequires:     unixODBC-devel}
67 %{?with_v8:BuildRequires:       v8-devel}
68 %if %{with plugins}
69 BuildRequires:  alsa-lib-devel
70 BuildRequires:  libv4l-devel
71 BuildRequires:  pulseaudio-devel
72 %endif
73 %{!?with_esd:Obsoletes: ptlib-sound-esd < %{epoch}:%{version}-%{release}}
74 Obsoletes:      ptlib-video-v4l < 1:2.10.7
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %description
78 PTLib (Portable Tools Library) is a moderately large class library
79 that has it's genesis many years ago as PWLib (portable Windows
80 Library), a method to product applications to run on both Microsoft
81 Windows and Unix systems. It has also been ported to other systems
82 such as Mac OSX, VxWorks and other embedded systems.
83
84 It is supplied mainly to support the OPAL project, but that shouldn't
85 stop you from using it in whatever project you have in mind if you so
86 desire.
87
88 %description -l pl.UTF-8
89 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
90 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
91 służącej do tworzenia aplikacji działających zarówno w systemach
92 Microsoft Windows jak i Unix. Została także przeniesiona na inne
93 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
94
95 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
96 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
97 na to ochotę.
98
99 %package devel
100 Summary:        PTLib (Portable Tools Library) development files
101 Summary(pl.UTF-8):      PTLib pliki deweloperskie
102 Group:          Development/Libraries
103 Requires:       %{name} = %{epoch}:%{version}-%{release}
104
105 %description devel
106 Header files and libraries for developing applications that use ptlib.
107
108 %description devel -l pl.UTF-8
109 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
110
111 %package static
112 Summary:        PTLib (Portable Tools Library) static libraries
113 Summary(pl.UTF-8):      Biblioteki statyczne PTLib
114 Group:          Development/Libraries
115 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
116
117 %description static
118 PTLib (Portable Tools Library) static libraries.
119
120 %description static -l pl.UTF-8
121 Biblioteki statyczne PTLib.
122
123 %package sound-alsa
124 Summary:        ALSA audio plugin for PTLib
125 Summary(pl.UTF-8):      Wtyczka dźwięku ALSA dla biblioteki PTLib
126 Group:          Libraries
127 Requires:       %{name} = %{epoch}:%{version}-%{release}
128 Provides:       %{name}-sound
129
130 %description sound-alsa
131 ALSA audio plugin for PTLib.
132
133 %description sound-alsa -l pl.UTF-8
134 Wtyczka dźwięku ALSA dla biblioteki PTLib.
135
136 %package sound-esd
137 Summary:        EsounD audio plugin for PTLib
138 Summary(pl.UTF-8):      Wtyczka dźwięku EsounD dla biblioteki PTLib
139 Group:          Libraries
140 Requires:       %{name} = %{epoch}:%{version}-%{release}
141 Provides:       %{name}-sound
142
143 %description sound-esd
144 EsounD audio plugin for PTLib.
145
146 %description sound-esd -l pl.UTF-8
147 Wtyczka dźwięku EsounD dla biblioteki PTLib.
148
149 %package sound-oss
150 Summary:        OSS audio plugin for PTLib
151 Summary(pl.UTF-8):      Wtyczka dźwięku OSS dla biblioteki PTLib
152 Group:          Libraries
153 Requires:       %{name} = %{epoch}:%{version}-%{release}
154 Provides:       %{name}-sound
155
156 %description sound-oss
157 OSS audio plugin for PTLib.
158
159 %description sound-oss -l pl.UTF-8
160 Wtyczka dźwięku OSS dla biblioteki PTLib.
161
162 %package sound-pulse
163 Summary:        Pulse audio plugin for PTLib
164 Summary(pl.UTF-8):      Wtyczka dźwięku Pulse dla biblioteki PTLib
165 Group:          Libraries
166 Requires:       %{name} = %{epoch}:%{version}-%{release}
167 Provides:       %{name}-sound
168
169 %description sound-pulse
170 Pulse audio plugin for PTLib.
171
172 %description sound-pulse -l pl.UTF-8
173 Wtyczka dźwięku Pulse dla biblioteki PTLib.
174
175 %package video-v4l2
176 Summary:        v4l2 video input plugin for PTLib
177 Summary(pl.UTF-8):      Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
178 Group:          Libraries
179 Requires:       %{name} = %{epoch}:%{version}-%{release}
180
181 %description video-v4l2
182 v4l2 video input plugin for PTLib.
183
184 %description video-v4l2 -l pl.UTF-8
185 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
186
187 %package video-avc
188 Summary:        AVC 1394 video input plugin for PTLib
189 Summary(pl.UTF-8):      Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
190 Group:          Libraries
191 Requires:       %{name} = %{epoch}:%{version}-%{release}
192
193 %description video-avc
194 AVC 1394 video input plugin for PTLib.
195
196 %description video-avc -l pl.UTF-8
197 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
198
199 %prep
200 %setup -q
201 %patch0 -p1
202 %patch1 -p1
203 %{!?with_ffmpeg:%patch2 -p1}
204
205 %build
206 %{__libtoolize}
207 %{__aclocal}
208 %{__autoconf}
209 # note: --enable-opal influences most of the remaining enable/disable defaults
210 %configure \
211         STRIP=/bin/true \
212         DSYMUTIL=/bin/true \
213         --enable-cpp11 \
214         %{!?with_festival:--disable-tts} \
215         --disable-v4l \
216         %{!?with_v8:--disable-v8} \
217 %if %{with plugins}
218         --enable-plugins \
219         --enable-alsa \
220         --enable-avc%{!?with_avc1394:=no} \
221         --enable-dc%{!?with_dc1394:=no} \
222         --enable-esd%{!?with_esd:=no} \
223         --enable-lua%{!?with_lua:=no} \
224         --enable-oss \
225         --enable-v4l2 \
226         --enable-pulse \
227 %else
228         --disable-plugins \
229         --disable-alsa \
230         --disable-avc \
231         --disable-dc \
232         --disable-esd \
233         --disable-oss \
234         --disable-v4l2 \
235 %endif
236 %if %{with http}
237         --enable-http \
238         --enable-httpforms \
239         --enable-httpsvc \
240 %else
241         --disable-http \
242         --disable-httpforms \
243         --disable-httpsvc \
244 %endif
245         --enable-ipv6%{!?with_ipv6:=no} \
246         --enable-odbc%{!?with_odbc:=no} \
247         --enable-openldap%{!?with_ldap:=no} \
248         --enable-openssl%{!?with_openssl:=no} \
249         --enable-resolver%{!?with_resolver:=no} \
250         --enable-sasl%{!?with_sasl:=no} \
251         --enable-video%{!?with_video:=no}
252
253 dir=$(pwd)
254 %{__make} \
255         V=1 \
256         PTLIBMAKEDIR="$dir/make" \
257         PTLIBDIR="$dir" \
258         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
259         LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
260         CXX="%{__cxx}"
261
262 %install
263 rm -rf $RPM_BUILD_ROOT
264
265 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
266
267 %{__make} install \
268         V=1 \
269         STRIP=/bin/true \
270         DESTDIR=$RPM_BUILD_ROOT
271
272 cp -p version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
273
274 %{__sed} -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
275
276 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
277 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
278
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %post   -p /sbin/ldconfig
283 %postun -p /sbin/ldconfig
284
285 %files
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
288 %if %{with plugins}
289 %dir %{_libdir}/%{name}-%{version}
290 %dir %{_libdir}/%{name}-%{version}/device
291 %dir %{_libdir}/%{name}-%{version}/device/sound
292 %dir %{_libdir}/%{name}-%{version}/device/videoinput
293 %endif
294
295 %files devel
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_libdir}/libpt.so
298 %{_includedir}/ptclib
299 %{_includedir}/ptlib
300 %{_includedir}/ptlib.h
301 %{_includedir}/ptlib_config.h
302 %{_includedir}/ptlib_wx.h
303 %dir %{_datadir}/%{name}
304 %dir %{_datadir}/%{name}/make
305 %{_datadir}/%{name}/make/*.mak
306 %{_pkgconfigdir}/ptlib.pc
307
308 %files static
309 %defattr(644,root,root,755)
310 %{_libdir}/libpt_s.a
311
312 %if %{with plugins}
313 %files sound-alsa
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
316
317 %if %{with esd}
318 %files sound-esd
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
321 %endif
322
323 %files sound-oss
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
326
327 %files sound-pulse
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
330
331 %files video-v4l2
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
334
335 %if %{with avc1394}
336 %files video-avc
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so
339 %endif
340 %endif
This page took 0.143613 seconds and 3 git commands to generate.