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 ldap # LDAP support
11 %bcond_without lua # Lua script support
12 %bcond_with odbc # ODBC support
13 %bcond_without openssl # openssl support
14 %bcond_without plugins # plugins support
15 %bcond_without resolver # resolver support
16 %bcond_without sasl # SASL support
17 %bcond_without video # video support
18 %bcond_with esd # EsounD audio support (obsolete)
19 %bcond_with avc1394 # AVC1394 video input plugin [requires old libraw1394]
20 %bcond_with dc1394 # DC1394 video input plugin [requires old libdc1394]
22 Summary: Portable Tools Library
23 Summary(pl.UTF-8): Przenośna biblioteka narzędziowa
30 Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
31 # Source0-md5: b0eeaef41e0bf8da8d046c22d9dd0c8d
32 URL: http://www.opalvoip.org/
33 %{?with_video:BuildRequires: SDL-devel}
34 BuildRequires: autoconf >= 2.50
35 BuildRequires: automake
37 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
38 %{?with_esd:BuildRequires: esound-devel}
39 BuildRequires: expat-devel
41 BuildRequires: gstreamer-devel
42 %{?with_avc1394:BuildRequires: libavc1394-devel}
43 %{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0}
44 BuildRequires: libstdc++-devel
45 %{?with_lua:BuildRequires: lua-devel >= 5.4}
46 %{?with_ldap:BuildRequires: openldap-devel}
47 %{?with_openssl:BuildRequires: openssl-devel}
48 BuildRequires: pkgconfig
49 %{?with_odbc:BuildRequires: unixODBC-devel}
51 BuildRequires: alsa-lib-devel
52 BuildRequires: libv4l-devel
53 BuildRequires: pulseaudio-devel
55 BuildConflicts: gstreamer0.10-devel
56 %{!?with_esd:Obsoletes: ptlib-sound-esd}
57 Obsoletes: ptlib-video-v4l
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 PTLib (Portable Tools Library) is a moderately large class library
62 that has it's genesis many years ago as PWLib (portable Windows
63 Library), a method to product applications to run on both Microsoft
64 Windows and Unix systems. It has also been ported to other systems
65 such as Mac OSX, VxWorks and other embedded systems.
67 It is supplied mainly to support the OPAL project, but that shouldn't
68 stop you from using it in whatever project you have in mind if you so
71 %description -l pl.UTF-8
72 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
73 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
74 służącej do tworzenia aplikacji działających zarówno w systemach
75 Microsoft Windows jak i Unix. Została także przeniesiona na inne
76 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
78 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
79 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
83 Summary: PTLib (Portable Tools Library) development files
84 Summary(pl.UTF-8): PTLib pliki deweloperskie
85 Group: Development/Libraries
86 Requires: %{name} = %{epoch}:%{version}-%{release}
89 Header files and libraries for developing applications that use ptlib.
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
95 Summary: PTLib (Portable Tools Library) static libraries
96 Summary(pl.UTF-8): Biblioteki statyczne PTLib
97 Group: Development/Libraries
98 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
101 PTLib (Portable Tools Library) static libraries.
103 %description static -l pl.UTF-8
104 Biblioteki statyczne PTLib.
107 Summary: ALSA audio plugin for PTLib
108 Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib
110 Requires: %{name} = %{epoch}:%{version}-%{release}
111 Provides: %{name}-sound
113 %description sound-alsa
114 ALSA audio plugin for PTLib.
116 %description sound-alsa -l pl.UTF-8
117 Wtyczka dźwięku ALSA dla biblioteki PTLib.
120 Summary: EsounD audio plugin for PTLib
121 Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib
123 Requires: %{name} = %{epoch}:%{version}-%{release}
124 Provides: %{name}-sound
126 %description sound-esd
127 EsounD audio plugin for PTLib.
129 %description sound-esd -l pl.UTF-8
130 Wtyczka dźwięku EsounD dla biblioteki PTLib.
133 Summary: OSS audio plugin for PTLib
134 Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib
136 Requires: %{name} = %{epoch}:%{version}-%{release}
137 Provides: %{name}-sound
139 %description sound-oss
140 OSS audio plugin for PTLib.
142 %description sound-oss -l pl.UTF-8
143 Wtyczka dźwięku OSS dla biblioteki PTLib.
146 Summary: Pulse audio plugin for PTLib
147 Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib
149 Requires: %{name} = %{epoch}:%{version}-%{release}
150 Provides: %{name}-sound
152 %description sound-pulse
153 Pulse audio plugin for PTLib.
155 %description sound-pulse -l pl.UTF-8
156 Wtyczka dźwięku Pulse dla biblioteki PTLib.
159 Summary: v4l2 video input plugin for PTLib
160 Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
162 Requires: %{name} = %{epoch}:%{version}-%{release}
164 %description video-v4l2
165 v4l2 video input plugin for PTLib.
167 %description video-v4l2 -l pl.UTF-8
168 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
171 Summary: AVC 1394 video input plugin for PTLib
172 Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
174 Requires: %{name} = %{epoch}:%{version}-%{release}
176 %description video-avc
177 AVC 1394 video input plugin for PTLib.
179 %description video-avc -l pl.UTF-8
180 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
186 # note: --enable-opal influences most of the remaining enable/disable defaults
194 --enable-avc%{!?with_avc1394:=no} \
195 --enable-dc%{!?with_dc1394:=no} \
196 --enable-esd%{!?with_esd:=no} \
197 --enable-lua%{!?with_lua:=no} \
216 --disable-httpforms \
219 --enable-ipv6%{!?with_ipv6:=no} \
220 --enable-odbc%{!?with_odbc:=no} \
221 --enable-openldap%{!?with_ldap:=no} \
222 --enable-openssl%{!?with_openssl:=no} \
223 --enable-resolver%{!?with_resolver:=no} \
224 --enable-sasl%{!?with_sasl:=no} \
225 --enable-video%{!?with_video:=no}
230 PTLIBMAKEDIR="$dir/make" \
232 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
233 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
237 rm -rf $RPM_BUILD_ROOT
239 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
244 DESTDIR=$RPM_BUILD_ROOT
246 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
248 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
250 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
251 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
254 rm -rf $RPM_BUILD_ROOT
256 %post -p /sbin/ldconfig
257 %postun -p /sbin/ldconfig
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
263 %dir %{_libdir}/%{name}-%{version}
264 %dir %{_libdir}/%{name}-%{version}/device
265 %dir %{_libdir}/%{name}-%{version}/device/sound
266 %dir %{_libdir}/%{name}-%{version}/device/videoinput
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/libpt.so
272 %{_includedir}/ptclib
274 %{_includedir}/ptlib.h
275 %{_includedir}/ptlib_config.h
276 %{_includedir}/ptlib_wx.h
277 %dir %{_datadir}/%{name}
278 %dir %{_datadir}/%{name}/make
279 %{_datadir}/%{name}/make/*.mak
280 %{_pkgconfigdir}/ptlib.pc
283 %defattr(644,root,root,755)
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
311 %defattr(644,root,root,755)
312 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so