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 %{?with_avc1394:BuildRequires: libavc1394-devel}
42 %{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0}
43 BuildRequires: libstdc++-devel
44 %{?with_lua:BuildRequires: lua-devel >= 5.4}
45 %{?with_ldap:BuildRequires: openldap-devel}
46 %{?with_openssl:BuildRequires: openssl-devel}
47 BuildRequires: pkgconfig
48 %{?with_odbc:BuildRequires: unixODBC-devel}
50 BuildRequires: alsa-lib-devel
51 BuildRequires: libv4l-devel
52 BuildRequires: pulseaudio-devel
54 %{!?with_esd:Obsoletes: ptlib-sound-esd}
55 Obsoletes: ptlib-video-v4l
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 PTLib (Portable Tools Library) is a moderately large class library
60 that has it's genesis many years ago as PWLib (portable Windows
61 Library), a method to product applications to run on both Microsoft
62 Windows and Unix systems. It has also been ported to other systems
63 such as Mac OSX, VxWorks and other embedded systems.
65 It is supplied mainly to support the OPAL project, but that shouldn't
66 stop you from using it in whatever project you have in mind if you so
69 %description -l pl.UTF-8
70 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
71 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
72 służącej do tworzenia aplikacji działających zarówno w systemach
73 Microsoft Windows jak i Unix. Została także przeniesiona na inne
74 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
76 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
77 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
81 Summary: PTLib (Portable Tools Library) development files
82 Summary(pl.UTF-8): PTLib pliki deweloperskie
83 Group: Development/Libraries
84 Requires: %{name} = %{epoch}:%{version}-%{release}
87 Header files and libraries for developing applications that use ptlib.
89 %description devel -l pl.UTF-8
90 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
93 Summary: PTLib (Portable Tools Library) static libraries
94 Summary(pl.UTF-8): Biblioteki statyczne PTLib
95 Group: Development/Libraries
96 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
99 PTLib (Portable Tools Library) static libraries.
101 %description static -l pl.UTF-8
102 Biblioteki statyczne PTLib.
105 Summary: ALSA audio plugin for PTLib
106 Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib
108 Requires: %{name} = %{epoch}:%{version}-%{release}
109 Provides: %{name}-sound
111 %description sound-alsa
112 ALSA audio plugin for PTLib.
114 %description sound-alsa -l pl.UTF-8
115 Wtyczka dźwięku ALSA dla biblioteki PTLib.
118 Summary: EsounD audio plugin for PTLib
119 Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib
121 Requires: %{name} = %{epoch}:%{version}-%{release}
122 Provides: %{name}-sound
124 %description sound-esd
125 EsounD audio plugin for PTLib.
127 %description sound-esd -l pl.UTF-8
128 Wtyczka dźwięku EsounD dla biblioteki PTLib.
131 Summary: OSS audio plugin for PTLib
132 Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib
134 Requires: %{name} = %{epoch}:%{version}-%{release}
135 Provides: %{name}-sound
137 %description sound-oss
138 OSS audio plugin for PTLib.
140 %description sound-oss -l pl.UTF-8
141 Wtyczka dźwięku OSS dla biblioteki PTLib.
144 Summary: Pulse audio plugin for PTLib
145 Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib
147 Requires: %{name} = %{epoch}:%{version}-%{release}
148 Provides: %{name}-sound
150 %description sound-pulse
151 Pulse audio plugin for PTLib.
153 %description sound-pulse -l pl.UTF-8
154 Wtyczka dźwięku Pulse dla biblioteki PTLib.
157 Summary: v4l2 video input plugin for PTLib
158 Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
160 Requires: %{name} = %{epoch}:%{version}-%{release}
162 %description video-v4l2
163 v4l2 video input plugin for PTLib.
165 %description video-v4l2 -l pl.UTF-8
166 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
169 Summary: AVC 1394 video input plugin for PTLib
170 Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
172 Requires: %{name} = %{epoch}:%{version}-%{release}
174 %description video-avc
175 AVC 1394 video input plugin for PTLib.
177 %description video-avc -l pl.UTF-8
178 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
184 # note: --enable-opal influences most of the remaining enable/disable defaults
191 --enable-avc%{!?with_avc1394:=no} \
192 --enable-dc%{!?with_dc1394:=no} \
193 --enable-esd%{!?with_esd:=no} \
194 --enable-lua%{!?with_lua:=no} \
213 --disable-httpforms \
216 --enable-ipv6%{!?with_ipv6:=no} \
217 --enable-odbc%{!?with_odbc:=no} \
218 --enable-openldap%{!?with_ldap:=no} \
219 --enable-openssl%{!?with_openssl:=no} \
220 --enable-resolver%{!?with_resolver:=no} \
221 --enable-sasl%{!?with_sasl:=no} \
222 --enable-video%{!?with_video:=no}
227 PTLIBMAKEDIR="$dir/make" \
229 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
230 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
234 rm -rf $RPM_BUILD_ROOT
236 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
240 DESTDIR=$RPM_BUILD_ROOT
242 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
244 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
246 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
247 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
250 rm -rf $RPM_BUILD_ROOT
252 %post -p /sbin/ldconfig
253 %postun -p /sbin/ldconfig
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
259 %dir %{_libdir}/%{name}-%{version}
260 %dir %{_libdir}/%{name}-%{version}/device
261 %dir %{_libdir}/%{name}-%{version}/device/sound
262 %dir %{_libdir}/%{name}-%{version}/device/videoinput
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/libpt.so
268 %{_includedir}/ptclib
270 %{_includedir}/ptlib.h
271 %{_includedir}/ptlib_config.h
272 %{_includedir}/ptlib_wx.h
273 %dir %{_datadir}/%{name}
274 %dir %{_datadir}/%{name}/make
275 %{_datadir}/%{name}/make/*.mak
276 %{_pkgconfigdir}/ptlib.pc
279 %defattr(644,root,root,755)
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so