]>
Commit | Line | Data |
---|---|---|
9eabec1b | 1 | # |
93cbf8d4 | 2 | # WARNING: keep compatible with Ekiga releases. |
5fa46637 | 3 | # Recommended versions of ptlib and opal can be found at: |
93cbf8d4 | 4 | # http://wiki.ekiga.org/index.php/Download_Ekiga_sources |
ae9cfba7 | 5 | # (for Ekiga 4.0.x it's ptlib 2.10.x + opal 3.10.x) |
5fa46637 | 6 | # |
91616ca7 | 7 | # Conditional build: |
34e60ae8 JB |
8 | %bcond_without http # HTTP support |
9 | %bcond_without ipv6 # IPv6 support | |
31011201 | 10 | %bcond_without festival # Festival TTS support |
34e60ae8 | 11 | %bcond_without ldap # LDAP support |
e0f7132c | 12 | %bcond_without lua # Lua script support |
df56f391 | 13 | %bcond_with odbc # ODBC support |
34e60ae8 JB |
14 | %bcond_without openssl # openssl support |
15 | %bcond_without plugins # plugins support | |
16 | %bcond_without resolver # resolver support | |
e0f7132c | 17 | %bcond_without sasl # SASL support |
5695d6a0 | 18 | %bcond_without v8 # V8 Javascript support |
34e60ae8 JB |
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] | |
f3a6dbca | 23 | %bcond_with ffmpeg # FFMPEG support [requires ffmpeg < 5] |
91616ca7 | 24 | # |
5695d6a0 JB |
25 | %ifnarch %{ix86} %{x8664} %{arm} mips |
26 | %undefine with_v8 | |
27 | %endif | |
9eabec1b | 28 | Summary: Portable Tools Library |
8a20fb6a | 29 | Summary(pl.UTF-8): Przenośna biblioteka narzędziowa |
9eabec1b | 30 | Name: ptlib |
31011201 | 31 | Version: 2.18.8 |
f3a6dbca | 32 | Release: 2 |
5fa46637 | 33 | Epoch: 1 |
0154cba6 JB |
34 | License: MPL v1.0 |
35 | Group: Libraries | |
d912cb99 | 36 | Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2 |
31011201 JB |
37 | # Source0-md5: 207f40521cde54a9c4e1e31a9cd8a101 |
38 | Patch0: %{name}-prefer-gst1.patch | |
39 | Patch1: %{name}-festival.patch | |
f3a6dbca | 40 | Patch2: no-ffmpeg.patch |
31011201 JB |
41 | # domain suspended (2022.04) |
42 | #URL: http://www.opalvoip.org/ | |
43 | URL: https://sourceforge.net/projects/opalvoip/ | |
44 | BuildRequires: ImageMagick-devel | |
91616ca7 | 45 | %{?with_video:BuildRequires: SDL-devel} |
31011201 | 46 | BuildRequires: autoconf >= 2.71 |
93cbf8d4 | 47 | BuildRequires: automake |
91616ca7 | 48 | BuildRequires: bison |
e0f7132c | 49 | %{?with_sasl:BuildRequires: cyrus-sasl-devel} |
34e60ae8 | 50 | %{?with_esd:BuildRequires: esound-devel} |
2da6e90a | 51 | BuildRequires: expat-devel |
31011201 | 52 | %{?with_festival:BuildRequires: festival-devel} |
f3a6dbca | 53 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} |
9eabec1b | 54 | BuildRequires: flex |
31011201 | 55 | BuildRequires: gstreamer-devel >= 1.0 |
34e60ae8 JB |
56 | %{?with_avc1394:BuildRequires: libavc1394-devel} |
57 | %{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0} | |
31011201 JB |
58 | BuildRequires: libjpeg-devel |
59 | BuildRequires: libpcap-devel | |
60 | BuildRequires: libstdc++-devel >= 6:4.7 | |
f2f74e95 | 61 | %{?with_lua:BuildRequires: lua-devel >= 5.4} |
31011201 | 62 | BuildRequires: ncurses-devel |
34e60ae8 | 63 | %{?with_ldap:BuildRequires: openldap-devel} |
1c7c1657 | 64 | %{?with_openssl:BuildRequires: openssl-devel} |
2da6e90a | 65 | BuildRequires: pkgconfig |
91616ca7 | 66 | %{?with_odbc:BuildRequires: unixODBC-devel} |
5695d6a0 | 67 | %{?with_v8:BuildRequires: v8-devel} |
34e60ae8 JB |
68 | %if %{with plugins} |
69 | BuildRequires: alsa-lib-devel | |
70 | BuildRequires: libv4l-devel | |
71 | BuildRequires: pulseaudio-devel | |
72 | %endif | |
31011201 JB |
73 | %{!?with_esd:Obsoletes: ptlib-sound-esd < %{epoch}:%{version}-%{release}} |
74 | Obsoletes: ptlib-video-v4l < 1:2.10.7 | |
9eabec1b | 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 | ||
8a20fb6a | 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 | ||
9eabec1b | 99 | %package devel |
100 | Summary: PTLib (Portable Tools Library) development files | |
8a20fb6a | 101 | Summary(pl.UTF-8): PTLib pliki deweloperskie |
9eabec1b | 102 | Group: Development/Libraries |
11b50e14 | 103 | Requires: %{name} = %{epoch}:%{version}-%{release} |
bb06b19d | 104 | |
9eabec1b | 105 | %description devel |
106 | Header files and libraries for developing applications that use ptlib. | |
107 | ||
8a20fb6a | 108 | %description devel -l pl.UTF-8 |
109 | Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib. | |
9eabec1b | 110 | |
111 | %package static | |
112 | Summary: PTLib (Portable Tools Library) static libraries | |
8a20fb6a | 113 | Summary(pl.UTF-8): Biblioteki statyczne PTLib |
9eabec1b | 114 | Group: Development/Libraries |
11b50e14 | 115 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
bb06b19d | 116 | |
9eabec1b | 117 | %description static |
118 | PTLib (Portable Tools Library) static libraries. | |
119 | ||
8a20fb6a | 120 | %description static -l pl.UTF-8 |
121 | Biblioteki statyczne PTLib. | |
122 | ||
9eabec1b | 123 | %package sound-alsa |
0154cba6 JB |
124 | Summary: ALSA audio plugin for PTLib |
125 | Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib | |
9eabec1b | 126 | Group: Libraries |
11b50e14 | 127 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 128 | Provides: %{name}-sound |
129 | ||
130 | %description sound-alsa | |
0154cba6 | 131 | ALSA audio plugin for PTLib. |
9eabec1b | 132 | |
8a20fb6a | 133 | %description sound-alsa -l pl.UTF-8 |
0154cba6 | 134 | Wtyczka dźwięku ALSA dla biblioteki PTLib. |
8a20fb6a | 135 | |
34e60ae8 JB |
136 | %package sound-esd |
137 | Summary: EsounD audio plugin for PTLib | |
138 | Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib | |
d912cb99 | 139 | Group: Libraries |
11b50e14 | 140 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d912cb99 CM |
141 | Provides: %{name}-sound |
142 | ||
34e60ae8 JB |
143 | %description sound-esd |
144 | EsounD audio plugin for PTLib. | |
d912cb99 | 145 | |
34e60ae8 JB |
146 | %description sound-esd -l pl.UTF-8 |
147 | Wtyczka dźwięku EsounD dla biblioteki PTLib. | |
d912cb99 | 148 | |
9eabec1b | 149 | %package sound-oss |
0154cba6 JB |
150 | Summary: OSS audio plugin for PTLib |
151 | Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib | |
9eabec1b | 152 | Group: Libraries |
11b50e14 | 153 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 154 | Provides: %{name}-sound |
155 | ||
156 | %description sound-oss | |
0154cba6 | 157 | OSS audio plugin for PTLib. |
9eabec1b | 158 | |
8a20fb6a | 159 | %description sound-oss -l pl.UTF-8 |
0154cba6 | 160 | Wtyczka dźwięku OSS dla biblioteki PTLib. |
8a20fb6a | 161 | |
34e60ae8 JB |
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 | ||
9eabec1b | 175 | %package video-v4l2 |
0154cba6 JB |
176 | Summary: v4l2 video input plugin for PTLib |
177 | Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib | |
9eabec1b | 178 | Group: Libraries |
11b50e14 | 179 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 180 | |
181 | %description video-v4l2 | |
0154cba6 | 182 | v4l2 video input plugin for PTLib. |
9eabec1b | 183 | |
8a20fb6a | 184 | %description video-v4l2 -l pl.UTF-8 |
0154cba6 | 185 | Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib. |
8a20fb6a | 186 | |
5fa46637 | 187 | %package video-avc |
0154cba6 JB |
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} | |
5fa46637 JK |
192 | |
193 | %description video-avc | |
0154cba6 JB |
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 | |
9eabec1b | 198 | |
199 | %prep | |
200 | %setup -q | |
31011201 JB |
201 | %patch0 -p1 |
202 | %patch1 -p1 | |
f3a6dbca | 203 | %{!?with_ffmpeg:%patch2 -p1} |
9eabec1b | 204 | |
205 | %build | |
31011201 JB |
206 | %{__libtoolize} |
207 | %{__aclocal} | |
208 | %{__autoconf} | |
91616ca7 | 209 | # note: --enable-opal influences most of the remaining enable/disable defaults |
9eabec1b | 210 | %configure \ |
1165d486 | 211 | STRIP=/bin/true \ |
f2f74e95 | 212 | DSYMUTIL=/bin/true \ |
31011201 JB |
213 | --enable-cpp11 \ |
214 | %{!?with_festival:--disable-tts} \ | |
34e60ae8 | 215 | --disable-v4l \ |
5695d6a0 | 216 | %{!?with_v8:--disable-v8} \ |
91616ca7 | 217 | %if %{with plugins} |
0154cba6 JB |
218 | --enable-plugins \ |
219 | --enable-alsa \ | |
34e60ae8 JB |
220 | --enable-avc%{!?with_avc1394:=no} \ |
221 | --enable-dc%{!?with_dc1394:=no} \ | |
222 | --enable-esd%{!?with_esd:=no} \ | |
93cbf8d4 | 223 | --enable-lua%{!?with_lua:=no} \ |
0154cba6 JB |
224 | --enable-oss \ |
225 | --enable-v4l2 \ | |
f2f74e95 | 226 | --enable-pulse \ |
91616ca7 | 227 | %else |
0154cba6 JB |
228 | --disable-plugins \ |
229 | --disable-alsa \ | |
34e60ae8 JB |
230 | --disable-avc \ |
231 | --disable-dc \ | |
232 | --disable-esd \ | |
0154cba6 JB |
233 | --disable-oss \ |
234 | --disable-v4l2 \ | |
91616ca7 | 235 | %endif |
f910b498 | 236 | %if %{with http} |
0154cba6 JB |
237 | --enable-http \ |
238 | --enable-httpforms \ | |
239 | --enable-httpsvc \ | |
f910b498 | 240 | %else |
0154cba6 JB |
241 | --disable-http \ |
242 | --disable-httpforms \ | |
243 | --disable-httpsvc \ | |
f910b498 | 244 | %endif |
0154cba6 JB |
245 | --enable-ipv6%{!?with_ipv6:=no} \ |
246 | --enable-odbc%{!?with_odbc:=no} \ | |
34e60ae8 | 247 | --enable-openldap%{!?with_ldap:=no} \ |
0154cba6 JB |
248 | --enable-openssl%{!?with_openssl:=no} \ |
249 | --enable-resolver%{!?with_resolver:=no} \ | |
34e60ae8 JB |
250 | --enable-sasl%{!?with_sasl:=no} \ |
251 | --enable-video%{!?with_video:=no} | |
91616ca7 | 252 | |
9eabec1b | 253 | dir=$(pwd) |
f2f74e95 | 254 | %{__make} \ |
ef28a618 | 255 | V=1 \ |
9eabec1b | 256 | PTLIBMAKEDIR="$dir/make" \ |
257 | PTLIBDIR="$dir" \ | |
ef28a618 JK |
258 | CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \ |
259 | LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \ | |
9eabec1b | 260 | CXX="%{__cxx}" |
261 | ||
9eabec1b | 262 | %install |
263 | rm -rf $RPM_BUILD_ROOT | |
264 | ||
f2f74e95 | 265 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}} |
9eabec1b | 266 | |
9eabec1b | 267 | %{__make} install \ |
ef28a618 | 268 | V=1 \ |
1165d486 | 269 | STRIP=/bin/true \ |
9eabec1b | 270 | DESTDIR=$RPM_BUILD_ROOT |
271 | ||
31011201 | 272 | cp -p version.h $RPM_BUILD_ROOT%{_includedir}/%{name} |
9eabec1b | 273 | |
31011201 | 274 | %{__sed} -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak |
90a4e09b | 275 | |
ef28a618 JK |
276 | chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.* |
277 | find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x | |
278 | ||
9eabec1b | 279 | %clean |
280 | rm -rf $RPM_BUILD_ROOT | |
281 | ||
0154cba6 JB |
282 | %post -p /sbin/ldconfig |
283 | %postun -p /sbin/ldconfig | |
9eabec1b | 284 | |
285 | %files | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) %{_libdir}/libpt.so.*.*.* | |
91616ca7 | 288 | %if %{with plugins} |
9eabec1b | 289 | %dir %{_libdir}/%{name}-%{version} |
f2f74e95 JR |
290 | %dir %{_libdir}/%{name}-%{version}/device |
291 | %dir %{_libdir}/%{name}-%{version}/device/sound | |
292 | %dir %{_libdir}/%{name}-%{version}/device/videoinput | |
91616ca7 | 293 | %endif |
9eabec1b | 294 | |
9eabec1b | 295 | %files devel |
296 | %defattr(644,root,root,755) | |
0154cba6 JB |
297 | %attr(755,root,root) %{_libdir}/libpt.so |
298 | %{_includedir}/ptclib | |
299 | %{_includedir}/ptlib | |
0154cba6 | 300 | %{_includedir}/ptlib.h |
f2f74e95 JR |
301 | %{_includedir}/ptlib_config.h |
302 | %{_includedir}/ptlib_wx.h | |
9eabec1b | 303 | %dir %{_datadir}/%{name} |
304 | %dir %{_datadir}/%{name}/make | |
9eabec1b | 305 | %{_datadir}/%{name}/make/*.mak |
93cbf8d4 | 306 | %{_pkgconfigdir}/ptlib.pc |
9eabec1b | 307 | |
308 | %files static | |
309 | %defattr(644,root,root,755) | |
0154cba6 | 310 | %{_libdir}/libpt_s.a |
9eabec1b | 311 | |
91616ca7 | 312 | %if %{with plugins} |
9eabec1b | 313 | %files sound-alsa |
314 | %defattr(644,root,root,755) | |
f2f74e95 | 315 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so |
9eabec1b | 316 | |
34e60ae8 JB |
317 | %if %{with esd} |
318 | %files sound-esd | |
d912cb99 | 319 | %defattr(644,root,root,755) |
f2f74e95 | 320 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so |
34e60ae8 | 321 | %endif |
d912cb99 | 322 | |
9eabec1b | 323 | %files sound-oss |
324 | %defattr(644,root,root,755) | |
f2f74e95 | 325 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so |
9eabec1b | 326 | |
34e60ae8 JB |
327 | %files sound-pulse |
328 | %defattr(644,root,root,755) | |
f2f74e95 | 329 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so |
34e60ae8 | 330 | |
9eabec1b | 331 | %files video-v4l2 |
332 | %defattr(644,root,root,755) | |
f2f74e95 | 333 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so |
9eabec1b | 334 | |
34e60ae8 | 335 | %if %{with avc1394} |
5fa46637 JK |
336 | %files video-avc |
337 | %defattr(644,root,root,755) | |
f2f74e95 | 338 | %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so |
5fa46637 | 339 | %endif |
91616ca7 | 340 | %endif |