]> git.pld-linux.org Git - packages/ptlib.git/blame - ptlib.spec
- release 3 (by relup.sh)
[packages/ptlib.git] / ptlib.spec
CommitLineData
9eabec1b 1#
93cbf8d4 2# WARNING: keep compatible with Ekiga releases.
5fa46637 3# Recommended versions of ptlib and opal can be found at:
93cbf8d4 4# http://wiki.ekiga.org/index.php/Download_Ekiga_sources
ae9cfba7 5# (for Ekiga 4.0.x it's ptlib 2.10.x + opal 3.10.x)
5fa46637 6#
91616ca7 7# Conditional build:
34e60ae8
JB
8%bcond_without http # HTTP support
9%bcond_without ipv6 # IPv6 support
10%bcond_without ldap # LDAP support
e0f7132c 11%bcond_without lua # Lua script support
34e60ae8
JB
12%bcond_without odbc # ODBC support
13%bcond_without openssl # openssl support
14%bcond_without plugins # plugins support
15%bcond_without resolver # resolver support
e0f7132c 16%bcond_without sasl # SASL support
34e60ae8
JB
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]
91616ca7 21#
9eabec1b 22Summary: Portable Tools Library
8a20fb6a 23Summary(pl.UTF-8): Przenośna biblioteka narzędziowa
9eabec1b 24Name: ptlib
93cbf8d4 25Version: 2.10.11
4935d990 26Release: 3
5fa46637 27Epoch: 1
0154cba6
JB
28License: MPL v1.0
29Group: Libraries
d912cb99 30Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
93cbf8d4 31# Source0-md5: eb2fb52c91224483c17dcea6df9c23a3
e5f1c490 32Patch0: bison3.patch
93cbf8d4 33Patch1: %{name}-lua.patch
0154cba6 34URL: http://www.opalvoip.org/
91616ca7 35%{?with_video:BuildRequires: SDL-devel}
93cbf8d4
JB
36BuildRequires: autoconf >= 2.50
37BuildRequires: automake
91616ca7 38BuildRequires: bison
e0f7132c 39%{?with_sasl:BuildRequires: cyrus-sasl-devel}
34e60ae8 40%{?with_esd:BuildRequires: esound-devel}
2da6e90a 41BuildRequires: expat-devel
9eabec1b 42BuildRequires: flex
34e60ae8
JB
43%{?with_avc1394:BuildRequires: libavc1394-devel}
44%{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0}
bb06b19d 45BuildRequires: libstdc++-devel
93cbf8d4 46%{?with_lua:BuildRequires: lua52-devel >= 5.2}
34e60ae8 47%{?with_ldap:BuildRequires: openldap-devel}
1c7c1657 48%{?with_openssl:BuildRequires: openssl-devel}
2da6e90a 49BuildRequires: pkgconfig
91616ca7 50%{?with_odbc:BuildRequires: unixODBC-devel}
34e60ae8
JB
51%if %{with plugins}
52BuildRequires: alsa-lib-devel
53BuildRequires: libv4l-devel
54BuildRequires: pulseaudio-devel
55%endif
56%{!?with_esd:Obsoletes: ptlib-sound-esd}
61dda034 57Obsoletes: ptlib-video-v4l
9eabec1b 58BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60%description
61PTLib (Portable Tools Library) is a moderately large class library
62that has it's genesis many years ago as PWLib (portable Windows
63Library), a method to product applications to run on both Microsoft
64Windows and Unix systems. It has also been ported to other systems
65such as Mac OSX, VxWorks and other embedded systems.
66
67It is supplied mainly to support the OPAL project, but that shouldn't
68stop you from using it in whatever project you have in mind if you so
69desire.
70
8a20fb6a 71%description -l pl.UTF-8
72PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
73biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
74służącej do tworzenia aplikacji działających zarówno w systemach
75Microsoft Windows jak i Unix. Została także przeniesiona na inne
76systemy takie jak Mac OSX, VxWorks i inne wbudowane.
77
78Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
79przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
80na to ochotę.
81
9eabec1b 82%package devel
83Summary: PTLib (Portable Tools Library) development files
8a20fb6a 84Summary(pl.UTF-8): PTLib pliki deweloperskie
9eabec1b 85Group: Development/Libraries
11b50e14 86Requires: %{name} = %{epoch}:%{version}-%{release}
bb06b19d 87
9eabec1b 88%description devel
89Header files and libraries for developing applications that use ptlib.
90
8a20fb6a 91%description devel -l pl.UTF-8
92Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
9eabec1b 93
94%package static
95Summary: PTLib (Portable Tools Library) static libraries
8a20fb6a 96Summary(pl.UTF-8): Biblioteki statyczne PTLib
9eabec1b 97Group: Development/Libraries
11b50e14 98Requires: %{name}-devel = %{epoch}:%{version}-%{release}
bb06b19d 99
9eabec1b 100%description static
101PTLib (Portable Tools Library) static libraries.
102
8a20fb6a 103%description static -l pl.UTF-8
104Biblioteki statyczne PTLib.
105
9eabec1b 106%package sound-alsa
0154cba6
JB
107Summary: ALSA audio plugin for PTLib
108Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib
9eabec1b 109Group: Libraries
11b50e14 110Requires: %{name} = %{epoch}:%{version}-%{release}
9eabec1b 111Provides: %{name}-sound
112
113%description sound-alsa
0154cba6 114ALSA audio plugin for PTLib.
9eabec1b 115
8a20fb6a 116%description sound-alsa -l pl.UTF-8
0154cba6 117Wtyczka dźwięku ALSA dla biblioteki PTLib.
8a20fb6a 118
34e60ae8
JB
119%package sound-esd
120Summary: EsounD audio plugin for PTLib
121Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib
d912cb99 122Group: Libraries
11b50e14 123Requires: %{name} = %{epoch}:%{version}-%{release}
d912cb99
CM
124Provides: %{name}-sound
125
34e60ae8
JB
126%description sound-esd
127EsounD audio plugin for PTLib.
d912cb99 128
34e60ae8
JB
129%description sound-esd -l pl.UTF-8
130Wtyczka dźwięku EsounD dla biblioteki PTLib.
d912cb99 131
9eabec1b 132%package sound-oss
0154cba6
JB
133Summary: OSS audio plugin for PTLib
134Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib
9eabec1b 135Group: Libraries
11b50e14 136Requires: %{name} = %{epoch}:%{version}-%{release}
9eabec1b 137Provides: %{name}-sound
138
139%description sound-oss
0154cba6 140OSS audio plugin for PTLib.
9eabec1b 141
8a20fb6a 142%description sound-oss -l pl.UTF-8
0154cba6 143Wtyczka dźwięku OSS dla biblioteki PTLib.
8a20fb6a 144
34e60ae8
JB
145%package sound-pulse
146Summary: Pulse audio plugin for PTLib
147Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib
148Group: Libraries
149Requires: %{name} = %{epoch}:%{version}-%{release}
150Provides: %{name}-sound
151
152%description sound-pulse
153Pulse audio plugin for PTLib.
154
155%description sound-pulse -l pl.UTF-8
156Wtyczka dźwięku Pulse dla biblioteki PTLib.
157
9eabec1b 158%package video-v4l2
0154cba6
JB
159Summary: v4l2 video input plugin for PTLib
160Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
9eabec1b 161Group: Libraries
11b50e14 162Requires: %{name} = %{epoch}:%{version}-%{release}
9eabec1b 163
164%description video-v4l2
0154cba6 165v4l2 video input plugin for PTLib.
9eabec1b 166
8a20fb6a 167%description video-v4l2 -l pl.UTF-8
0154cba6 168Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
8a20fb6a 169
5fa46637 170%package video-avc
0154cba6
JB
171Summary: AVC 1394 video input plugin for PTLib
172Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
173Group: Libraries
174Requires: %{name} = %{epoch}:%{version}-%{release}
5fa46637
JK
175
176%description video-avc
0154cba6
JB
177AVC 1394 video input plugin for PTLib.
178
179%description video-avc -l pl.UTF-8
180Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
9eabec1b 181
182%prep
183%setup -q
e5f1c490 184%patch0 -p1
93cbf8d4 185%patch1 -p1
9eabec1b 186
187%build
93cbf8d4
JB
188%{__aclocal}
189%{__autoconf}
91616ca7 190# note: --enable-opal influences most of the remaining enable/disable defaults
93cbf8d4 191%{?with_lua:CPPFLAGS="%{rpmcppflags} -I/usr/include/lua5.2"}
9eabec1b 192%configure \
34e60ae8 193 --disable-v4l \
91616ca7 194%if %{with plugins}
0154cba6
JB
195 --enable-plugins \
196 --enable-alsa \
34e60ae8
JB
197 --enable-avc%{!?with_avc1394:=no} \
198 --enable-dc%{!?with_dc1394:=no} \
199 --enable-esd%{!?with_esd:=no} \
93cbf8d4 200 --enable-lua%{!?with_lua:=no} \
0154cba6
JB
201 --enable-oss \
202 --enable-v4l2 \
91616ca7 203%else
0154cba6
JB
204 --disable-plugins \
205 --disable-alsa \
34e60ae8
JB
206 --disable-avc \
207 --disable-dc \
208 --disable-esd \
0154cba6
JB
209 --disable-oss \
210 --disable-v4l2 \
91616ca7 211%endif
f910b498 212%if %{with http}
0154cba6
JB
213 --enable-http \
214 --enable-httpforms \
215 --enable-httpsvc \
f910b498 216%else
0154cba6
JB
217 --disable-http \
218 --disable-httpforms \
219 --disable-httpsvc \
f910b498 220%endif
0154cba6
JB
221 --enable-ipv6%{!?with_ipv6:=no} \
222 --enable-odbc%{!?with_odbc:=no} \
34e60ae8 223 --enable-openldap%{!?with_ldap:=no} \
0154cba6
JB
224 --enable-openssl%{!?with_openssl:=no} \
225 --enable-resolver%{!?with_resolver:=no} \
34e60ae8
JB
226 --enable-sasl%{!?with_sasl:=no} \
227 --enable-video%{!?with_video:=no}
91616ca7 228
9eabec1b 229dir=$(pwd)
230%{__make} %{?debug:debugshared}%{!?debug:optshared} \
ef28a618 231 V=1 \
9eabec1b 232 PTLIBMAKEDIR="$dir/make" \
233 PTLIBDIR="$dir" \
ef28a618
JK
234 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
235 LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
9eabec1b 236 CXX="%{__cxx}"
237
9eabec1b 238%install
239rm -rf $RPM_BUILD_ROOT
240
241install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/%{name}}
242
9eabec1b 243%{__make} install \
ef28a618 244 V=1 \
9eabec1b 245 DESTDIR=$RPM_BUILD_ROOT
246
9eabec1b 247cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
248
90a4e09b
AM
249sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
250
ef28a618
JK
251chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
252find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
253
9eabec1b 254%clean
255rm -rf $RPM_BUILD_ROOT
256
0154cba6
JB
257%post -p /sbin/ldconfig
258%postun -p /sbin/ldconfig
9eabec1b 259
260%files
261%defattr(644,root,root,755)
262%attr(755,root,root) %{_libdir}/libpt.so.*.*.*
91616ca7 263%if %{with plugins}
9eabec1b 264%dir %{_libdir}/%{name}-%{version}
265%dir %{_libdir}/%{name}-%{version}/devices
266%dir %{_libdir}/%{name}-%{version}/devices/sound
267%dir %{_libdir}/%{name}-%{version}/devices/videoinput
91616ca7 268%endif
9eabec1b 269
9eabec1b 270%files devel
271%defattr(644,root,root,755)
0154cba6
JB
272%attr(755,root,root) %{_bindir}/ptlib-config
273%attr(755,root,root) %{_libdir}/libpt.so
274%{_includedir}/ptclib
275%{_includedir}/ptlib
276%{_includedir}/ptbuildopts.h
277%{_includedir}/ptlib.h
9eabec1b 278%dir %{_datadir}/%{name}
279%dir %{_datadir}/%{name}/make
ac387258 280%attr(755,root,root) %{_datadir}/%{name}/make/%{name}-config
9eabec1b 281%{_datadir}/%{name}/make/*.mak
93cbf8d4 282%{_pkgconfigdir}/ptlib.pc
9eabec1b 283
284%files static
285%defattr(644,root,root,755)
0154cba6 286%{_libdir}/libpt_s.a
9eabec1b 287
91616ca7 288%if %{with plugins}
9eabec1b 289%files sound-alsa
290%defattr(644,root,root,755)
291%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/alsa_pwplugin.so
292
34e60ae8
JB
293%if %{with esd}
294%files sound-esd
d912cb99 295%defattr(644,root,root,755)
34e60ae8
JB
296%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/esd_pwplugin.so
297%endif
d912cb99 298
9eabec1b 299%files sound-oss
300%defattr(644,root,root,755)
301%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/oss_pwplugin.so
302
34e60ae8
JB
303%files sound-pulse
304%defattr(644,root,root,755)
305%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/pulse_pwplugin.so
306
9eabec1b 307%files video-v4l2
308%defattr(644,root,root,755)
309%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/v4l2_pwplugin.so
310
34e60ae8 311%if %{with avc1394}
5fa46637
JK
312%files video-avc
313%defattr(644,root,root,755)
314%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/avc_pwplugin.so
315%endif
91616ca7 316%endif
This page took 0.120958 seconds and 4 git commands to generate.