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 video # video support
19 %bcond_with esd # EsounD audio support (obsolete)
20 %bcond_with avc1394 # AVC1394 video input plugin [requires old libraw1394]
21 %bcond_with dc1394 # DC1394 video input plugin [requires old libdc1394]
23 Summary: Portable Tools Library
24 Summary(pl.UTF-8): Przenośna biblioteka narzędziowa
31 Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
32 # Source0-md5: 207f40521cde54a9c4e1e31a9cd8a101
33 Patch0: %{name}-prefer-gst1.patch
34 Patch1: %{name}-festival.patch
35 # domain suspended (2022.04)
36 #URL: http://www.opalvoip.org/
37 URL: https://sourceforge.net/projects/opalvoip/
38 BuildRequires: ImageMagick-devel
39 %{?with_video:BuildRequires: SDL-devel}
40 BuildRequires: autoconf >= 2.71
41 BuildRequires: automake
43 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
44 %{?with_esd:BuildRequires: esound-devel}
45 BuildRequires: expat-devel
46 %{?with_festival:BuildRequires: festival-devel}
47 BuildRequires: ffmpeg-devel
49 BuildRequires: gstreamer-devel >= 1.0
50 %{?with_avc1394:BuildRequires: libavc1394-devel}
51 %{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0}
52 BuildRequires: libjpeg-devel
53 BuildRequires: libpcap-devel
54 BuildRequires: libstdc++-devel >= 6:4.7
55 %{?with_lua:BuildRequires: lua-devel >= 5.4}
56 BuildRequires: ncurses-devel
57 %{?with_ldap:BuildRequires: openldap-devel}
58 %{?with_openssl:BuildRequires: openssl-devel}
59 BuildRequires: pkgconfig
60 %{?with_odbc:BuildRequires: unixODBC-devel}
61 BuildRequires: v8-devel
63 BuildRequires: alsa-lib-devel
64 BuildRequires: libv4l-devel
65 BuildRequires: pulseaudio-devel
67 %{!?with_esd:Obsoletes: ptlib-sound-esd < %{epoch}:%{version}-%{release}}
68 Obsoletes: ptlib-video-v4l < 1:2.10.7
69 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 PTLib (Portable Tools Library) is a moderately large class library
73 that has it's genesis many years ago as PWLib (portable Windows
74 Library), a method to product applications to run on both Microsoft
75 Windows and Unix systems. It has also been ported to other systems
76 such as Mac OSX, VxWorks and other embedded systems.
78 It is supplied mainly to support the OPAL project, but that shouldn't
79 stop you from using it in whatever project you have in mind if you so
82 %description -l pl.UTF-8
83 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
84 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
85 służącej do tworzenia aplikacji działających zarówno w systemach
86 Microsoft Windows jak i Unix. Została także przeniesiona na inne
87 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
89 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
90 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
94 Summary: PTLib (Portable Tools Library) development files
95 Summary(pl.UTF-8): PTLib pliki deweloperskie
96 Group: Development/Libraries
97 Requires: %{name} = %{epoch}:%{version}-%{release}
100 Header files and libraries for developing applications that use ptlib.
102 %description devel -l pl.UTF-8
103 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
106 Summary: PTLib (Portable Tools Library) static libraries
107 Summary(pl.UTF-8): Biblioteki statyczne PTLib
108 Group: Development/Libraries
109 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
112 PTLib (Portable Tools Library) static libraries.
114 %description static -l pl.UTF-8
115 Biblioteki statyczne PTLib.
118 Summary: ALSA audio plugin for PTLib
119 Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib
121 Requires: %{name} = %{epoch}:%{version}-%{release}
122 Provides: %{name}-sound
124 %description sound-alsa
125 ALSA audio plugin for PTLib.
127 %description sound-alsa -l pl.UTF-8
128 Wtyczka dźwięku ALSA dla biblioteki PTLib.
131 Summary: EsounD audio plugin for PTLib
132 Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib
134 Requires: %{name} = %{epoch}:%{version}-%{release}
135 Provides: %{name}-sound
137 %description sound-esd
138 EsounD audio plugin for PTLib.
140 %description sound-esd -l pl.UTF-8
141 Wtyczka dźwięku EsounD dla biblioteki PTLib.
144 Summary: OSS audio plugin for PTLib
145 Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib
147 Requires: %{name} = %{epoch}:%{version}-%{release}
148 Provides: %{name}-sound
150 %description sound-oss
151 OSS audio plugin for PTLib.
153 %description sound-oss -l pl.UTF-8
154 Wtyczka dźwięku OSS dla biblioteki PTLib.
157 Summary: Pulse audio plugin for PTLib
158 Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib
160 Requires: %{name} = %{epoch}:%{version}-%{release}
161 Provides: %{name}-sound
163 %description sound-pulse
164 Pulse audio plugin for PTLib.
166 %description sound-pulse -l pl.UTF-8
167 Wtyczka dźwięku Pulse dla biblioteki PTLib.
170 Summary: v4l2 video input plugin for PTLib
171 Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
173 Requires: %{name} = %{epoch}:%{version}-%{release}
175 %description video-v4l2
176 v4l2 video input plugin for PTLib.
178 %description video-v4l2 -l pl.UTF-8
179 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
182 Summary: AVC 1394 video input plugin for PTLib
183 Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
185 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description video-avc
188 AVC 1394 video input plugin for PTLib.
190 %description video-avc -l pl.UTF-8
191 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
202 # note: --enable-opal influences most of the remaining enable/disable defaults
207 %{!?with_festival:--disable-tts} \
212 --enable-avc%{!?with_avc1394:=no} \
213 --enable-dc%{!?with_dc1394:=no} \
214 --enable-esd%{!?with_esd:=no} \
215 --enable-lua%{!?with_lua:=no} \
234 --disable-httpforms \
237 --enable-ipv6%{!?with_ipv6:=no} \
238 --enable-odbc%{!?with_odbc:=no} \
239 --enable-openldap%{!?with_ldap:=no} \
240 --enable-openssl%{!?with_openssl:=no} \
241 --enable-resolver%{!?with_resolver:=no} \
242 --enable-sasl%{!?with_sasl:=no} \
243 --enable-video%{!?with_video:=no}
248 PTLIBMAKEDIR="$dir/make" \
250 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
251 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
255 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
262 DESTDIR=$RPM_BUILD_ROOT
264 cp -p version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
266 %{__sed} -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
268 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
269 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
272 rm -rf $RPM_BUILD_ROOT
274 %post -p /sbin/ldconfig
275 %postun -p /sbin/ldconfig
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
281 %dir %{_libdir}/%{name}-%{version}
282 %dir %{_libdir}/%{name}-%{version}/device
283 %dir %{_libdir}/%{name}-%{version}/device/sound
284 %dir %{_libdir}/%{name}-%{version}/device/videoinput
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/libpt.so
290 %{_includedir}/ptclib
292 %{_includedir}/ptlib.h
293 %{_includedir}/ptlib_config.h
294 %{_includedir}/ptlib_wx.h
295 %dir %{_datadir}/%{name}
296 %dir %{_datadir}/%{name}/make
297 %{_datadir}/%{name}/make/*.mak
298 %{_pkgconfigdir}/ptlib.pc
301 %defattr(644,root,root,755)
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
311 %defattr(644,root,root,755)
312 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so