3 %bcond_without http # Disable http support
4 %bcond_without ipv6 # Disable ipv6 support
5 %bcond_without odbc # Disable ODBC support
6 %bcond_without plugins # Disable plugins support
7 %bcond_without resolver # Disable resolver support
8 %bcond_without openssl # Disable openssl support
9 %bcond_without video # Disable video support
11 Summary: Portable Tools Library
12 Summary(pl.UTF-8): Przenośna biblioteka narzędziowa
16 URL: http://www.opalvoip.org/
17 Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
18 # Source0-md5: 39d53e09a698bd6099088b4465cfc841
19 Patch0: %{name}-std_allocator.patch
22 %{?with_video:BuildRequires: SDL-devel}
24 BuildRequires: alsa-lib-devel
25 BuildRequires: libv4l-devel
26 BuildRequires: pulseaudio-devel
29 BuildRequires: expat-devel
31 #BuildRequires: libavc1394-devel
32 #BuildRequires: libdc1394-devel < 2.0.0
33 BuildRequires: libstdc++-devel
34 %{?with_openssl:BuildRequires: openssl-devel}
35 BuildRequires: pkgconfig
36 %{?with_odbc:BuildRequires: unixODBC-devel}
37 Obsoletes: ptlib-sound-esd
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 PTLib (Portable Tools Library) is a moderately large class library
42 that has it's genesis many years ago as PWLib (portable Windows
43 Library), a method to product applications to run on both Microsoft
44 Windows and Unix systems. It has also been ported to other systems
45 such as Mac OSX, VxWorks and other embedded systems.
47 It is supplied mainly to support the OPAL project, but that shouldn't
48 stop you from using it in whatever project you have in mind if you so
51 %description -l pl.UTF-8
52 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
53 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
54 służącej do tworzenia aplikacji działających zarówno w systemach
55 Microsoft Windows jak i Unix. Została także przeniesiona na inne
56 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
58 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
59 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
63 Summary: PTLib (Portable Tools Library) development files
64 Summary(pl.UTF-8): PTLib pliki deweloperskie
65 Group: Development/Libraries
66 Requires: %{name} = %{version}-%{release}
70 Header files and libraries for developing applications that use ptlib.
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
76 Summary: PTLib (Portable Tools Library) static libraries
77 Summary(pl.UTF-8): Biblioteki statyczne PTLib
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{version}-%{release}
83 PTLib (Portable Tools Library) static libraries.
85 %description static -l pl.UTF-8
86 Biblioteki statyczne PTLib.
89 Summary: Alsa audio plugin
90 Summary(pl.UTF-8): Alsa wtyczka audio
92 Requires: %{name} = %{version}-%{release}
93 Provides: %{name}-sound
95 %description sound-alsa
98 %description sound-alsa -l pl.UTF-8
102 Summary: Pulse audio plugin
103 Summary(pl.UTF-8): Pulse wtyczka audio
105 Requires: %{name} = %{version}-%{release}
106 Provides: %{name}-sound
108 %description sound-pulse
111 %description sound-pulse -l pl.UTF-8
115 Summary: OSS audio plugin
116 Summary(pl.UTF-8): OSS wtyczka audio
118 Requires: %{name} = %{version}-%{release}
119 Provides: %{name}-sound
121 %description sound-oss
124 %description sound-oss -l pl.UTF-8
128 Summary: v4l video input plugin
129 Summary(pl.UTF-8): v4l wejściowa wtyczka wideo
131 Requires: %{name} = %{version}-%{release}
133 %description video-v4l
134 v4l video input plugin.
136 %description video-v4l -l pl.UTF-8
137 v4l wejściowa wtyczka wideo.
140 Summary: v4l2 video input plugin
141 Summary(pl.UTF-8): v4l2 wejściowa wtyczka wideo
143 Requires: %{name} = %{version}-%{release}
145 %description video-v4l2
146 v4l2 video input plugin.
148 %description video-v4l2 -l pl.UTF-8
149 v4l2 wejściowa wtyczka wideo.
151 #%package video-avc #Summary: AVC 1394 video input plugin #Group:
152 Libraries #Requires: %{name} = %{version}-%{release} # #%description
153 video-avc #AVC 1394 video input plugin.
160 # note: --enable-opal influences most of the remaining enable/disable defaults
162 --prefix=%{_prefix} \
184 --disable-httpforms \
187 --%{?with_ipv6:en}%{!?with_ipv6:dis}able-ipv6 \
188 --%{?with_odbc:en}%{!?with_odbc:dis}able-odbc \
189 --%{?with_resolver:en}%{!?with_resolver:dis}able-resolver \
190 --%{?with_openssl:en}%{!?with_openssl:dis}able-openssl \
191 --%{?with_video:en}%{!?with_video:dis}able-video \
198 %{__make} %{?debug:debugshared}%{!?debug:optshared} \
200 PTLIBMAKEDIR="$dir/make" \
202 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
203 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
208 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/%{name}}
215 DESTDIR=$RPM_BUILD_ROOT
217 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
219 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
221 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
222 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
225 rm -rf $RPM_BUILD_ROOT
227 %post -p /sbin/ldconfig
228 %postun -p /sbin/ldconfig
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
234 %dir %{_libdir}/%{name}-%{version}
235 %dir %{_libdir}/%{name}-%{version}/devices
236 %dir %{_libdir}/%{name}-%{version}/devices/sound
237 %dir %{_libdir}/%{name}-%{version}/devices/videoinput
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libpt*.so
243 %dir %{_datadir}/%{name}
244 %dir %{_datadir}/%{name}/make
245 %attr(755,root,root) %{_bindir}/*
246 %attr(755,root,root) %{_datadir}/%{name}/make/%{name}-config
247 %{_includedir}/ptclib
250 %{_datadir}/%{name}/make/*.mak
251 %{_pkgconfigdir}/%{name}.pc
254 %defattr(644,root,root,755)
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/alsa_pwplugin.so
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/pulse_pwplugin.so
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/oss_pwplugin.so
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/v4l_pwplugin.so
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/v4l2_pwplugin.so
279 #%defattr(644,root,root,755)
280 #%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/avc_pwplugin.so