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)
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]
25 %ifnarch %{ix86} %{x8664} %{arm} mips
28 Summary: Portable Tools Library
29 Summary(pl.UTF-8): Przenośna biblioteka narzędziowa
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
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}
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}
69 BuildRequires: alsa-lib-devel
70 BuildRequires: libv4l-devel
71 BuildRequires: pulseaudio-devel
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)
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.
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
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.
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
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}
106 Header files and libraries for developing applications that use ptlib.
108 %description devel -l pl.UTF-8
109 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
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}
118 PTLib (Portable Tools Library) static libraries.
120 %description static -l pl.UTF-8
121 Biblioteki statyczne PTLib.
124 Summary: ALSA audio plugin for PTLib
125 Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib
127 Requires: %{name} = %{epoch}:%{version}-%{release}
128 Provides: %{name}-sound
130 %description sound-alsa
131 ALSA audio plugin for PTLib.
133 %description sound-alsa -l pl.UTF-8
134 Wtyczka dźwięku ALSA dla biblioteki PTLib.
137 Summary: EsounD audio plugin for PTLib
138 Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib
140 Requires: %{name} = %{epoch}:%{version}-%{release}
141 Provides: %{name}-sound
143 %description sound-esd
144 EsounD audio plugin for PTLib.
146 %description sound-esd -l pl.UTF-8
147 Wtyczka dźwięku EsounD dla biblioteki PTLib.
150 Summary: OSS audio plugin for PTLib
151 Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib
153 Requires: %{name} = %{epoch}:%{version}-%{release}
154 Provides: %{name}-sound
156 %description sound-oss
157 OSS audio plugin for PTLib.
159 %description sound-oss -l pl.UTF-8
160 Wtyczka dźwięku OSS dla biblioteki PTLib.
163 Summary: Pulse audio plugin for PTLib
164 Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib
166 Requires: %{name} = %{epoch}:%{version}-%{release}
167 Provides: %{name}-sound
169 %description sound-pulse
170 Pulse audio plugin for PTLib.
172 %description sound-pulse -l pl.UTF-8
173 Wtyczka dźwięku Pulse dla biblioteki PTLib.
176 Summary: v4l2 video input plugin for PTLib
177 Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
179 Requires: %{name} = %{epoch}:%{version}-%{release}
181 %description video-v4l2
182 v4l2 video input plugin for PTLib.
184 %description video-v4l2 -l pl.UTF-8
185 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
188 Summary: AVC 1394 video input plugin for PTLib
189 Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
191 Requires: %{name} = %{epoch}:%{version}-%{release}
193 %description video-avc
194 AVC 1394 video input plugin for PTLib.
196 %description video-avc -l pl.UTF-8
197 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
203 %{!?with_ffmpeg:%patch2 -p1}
209 # note: --enable-opal influences most of the remaining enable/disable defaults
214 %{!?with_festival:--disable-tts} \
216 %{!?with_v8:--disable-v8} \
220 --enable-avc%{!?with_avc1394:=no} \
221 --enable-dc%{!?with_dc1394:=no} \
222 --enable-esd%{!?with_esd:=no} \
223 --enable-lua%{!?with_lua:=no} \
242 --disable-httpforms \
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}
256 PTLIBMAKEDIR="$dir/make" \
258 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
259 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
263 rm -rf $RPM_BUILD_ROOT
265 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
270 DESTDIR=$RPM_BUILD_ROOT
272 cp -p version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
274 %{__sed} -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
276 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
277 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
280 rm -rf $RPM_BUILD_ROOT
282 %post -p /sbin/ldconfig
283 %postun -p /sbin/ldconfig
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
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
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_libdir}/libpt.so
298 %{_includedir}/ptclib
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
309 %defattr(644,root,root,755)
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so