]>
Commit | Line | Data |
---|---|---|
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 | 22 | Summary: Portable Tools Library |
8a20fb6a | 23 | Summary(pl.UTF-8): Przenośna biblioteka narzędziowa |
9eabec1b | 24 | Name: ptlib |
93cbf8d4 | 25 | Version: 2.10.11 |
4935d990 | 26 | Release: 3 |
5fa46637 | 27 | Epoch: 1 |
0154cba6 JB |
28 | License: MPL v1.0 |
29 | Group: Libraries | |
d912cb99 | 30 | Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2 |
93cbf8d4 | 31 | # Source0-md5: eb2fb52c91224483c17dcea6df9c23a3 |
e5f1c490 | 32 | Patch0: bison3.patch |
93cbf8d4 | 33 | Patch1: %{name}-lua.patch |
0154cba6 | 34 | URL: http://www.opalvoip.org/ |
91616ca7 | 35 | %{?with_video:BuildRequires: SDL-devel} |
93cbf8d4 JB |
36 | BuildRequires: autoconf >= 2.50 |
37 | BuildRequires: automake | |
91616ca7 | 38 | BuildRequires: bison |
e0f7132c | 39 | %{?with_sasl:BuildRequires: cyrus-sasl-devel} |
34e60ae8 | 40 | %{?with_esd:BuildRequires: esound-devel} |
2da6e90a | 41 | BuildRequires: expat-devel |
9eabec1b | 42 | BuildRequires: flex |
34e60ae8 JB |
43 | %{?with_avc1394:BuildRequires: libavc1394-devel} |
44 | %{?with_dc1394:BuildRequires: libdc1394-devel < 2.0.0} | |
bb06b19d | 45 | BuildRequires: 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 | 49 | BuildRequires: pkgconfig |
91616ca7 | 50 | %{?with_odbc:BuildRequires: unixODBC-devel} |
34e60ae8 JB |
51 | %if %{with plugins} |
52 | BuildRequires: alsa-lib-devel | |
53 | BuildRequires: libv4l-devel | |
54 | BuildRequires: pulseaudio-devel | |
55 | %endif | |
56 | %{!?with_esd:Obsoletes: ptlib-sound-esd} | |
61dda034 | 57 | Obsoletes: ptlib-video-v4l |
9eabec1b | 58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
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. | |
66 | ||
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 | |
69 | desire. | |
70 | ||
8a20fb6a | 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. | |
77 | ||
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 | |
80 | na to ochotę. | |
81 | ||
9eabec1b | 82 | %package devel |
83 | Summary: PTLib (Portable Tools Library) development files | |
8a20fb6a | 84 | Summary(pl.UTF-8): PTLib pliki deweloperskie |
9eabec1b | 85 | Group: Development/Libraries |
11b50e14 | 86 | Requires: %{name} = %{epoch}:%{version}-%{release} |
bb06b19d | 87 | |
9eabec1b | 88 | %description devel |
89 | Header files and libraries for developing applications that use ptlib. | |
90 | ||
8a20fb6a | 91 | %description devel -l pl.UTF-8 |
92 | Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib. | |
9eabec1b | 93 | |
94 | %package static | |
95 | Summary: PTLib (Portable Tools Library) static libraries | |
8a20fb6a | 96 | Summary(pl.UTF-8): Biblioteki statyczne PTLib |
9eabec1b | 97 | Group: Development/Libraries |
11b50e14 | 98 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
bb06b19d | 99 | |
9eabec1b | 100 | %description static |
101 | PTLib (Portable Tools Library) static libraries. | |
102 | ||
8a20fb6a | 103 | %description static -l pl.UTF-8 |
104 | Biblioteki statyczne PTLib. | |
105 | ||
9eabec1b | 106 | %package sound-alsa |
0154cba6 JB |
107 | Summary: ALSA audio plugin for PTLib |
108 | Summary(pl.UTF-8): Wtyczka dźwięku ALSA dla biblioteki PTLib | |
9eabec1b | 109 | Group: Libraries |
11b50e14 | 110 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 111 | Provides: %{name}-sound |
112 | ||
113 | %description sound-alsa | |
0154cba6 | 114 | ALSA audio plugin for PTLib. |
9eabec1b | 115 | |
8a20fb6a | 116 | %description sound-alsa -l pl.UTF-8 |
0154cba6 | 117 | Wtyczka dźwięku ALSA dla biblioteki PTLib. |
8a20fb6a | 118 | |
34e60ae8 JB |
119 | %package sound-esd |
120 | Summary: EsounD audio plugin for PTLib | |
121 | Summary(pl.UTF-8): Wtyczka dźwięku EsounD dla biblioteki PTLib | |
d912cb99 | 122 | Group: Libraries |
11b50e14 | 123 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d912cb99 CM |
124 | Provides: %{name}-sound |
125 | ||
34e60ae8 JB |
126 | %description sound-esd |
127 | EsounD audio plugin for PTLib. | |
d912cb99 | 128 | |
34e60ae8 JB |
129 | %description sound-esd -l pl.UTF-8 |
130 | Wtyczka dźwięku EsounD dla biblioteki PTLib. | |
d912cb99 | 131 | |
9eabec1b | 132 | %package sound-oss |
0154cba6 JB |
133 | Summary: OSS audio plugin for PTLib |
134 | Summary(pl.UTF-8): Wtyczka dźwięku OSS dla biblioteki PTLib | |
9eabec1b | 135 | Group: Libraries |
11b50e14 | 136 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 137 | Provides: %{name}-sound |
138 | ||
139 | %description sound-oss | |
0154cba6 | 140 | OSS audio plugin for PTLib. |
9eabec1b | 141 | |
8a20fb6a | 142 | %description sound-oss -l pl.UTF-8 |
0154cba6 | 143 | Wtyczka dźwięku OSS dla biblioteki PTLib. |
8a20fb6a | 144 | |
34e60ae8 JB |
145 | %package sound-pulse |
146 | Summary: Pulse audio plugin for PTLib | |
147 | Summary(pl.UTF-8): Wtyczka dźwięku Pulse dla biblioteki PTLib | |
148 | Group: Libraries | |
149 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
150 | Provides: %{name}-sound | |
151 | ||
152 | %description sound-pulse | |
153 | Pulse audio plugin for PTLib. | |
154 | ||
155 | %description sound-pulse -l pl.UTF-8 | |
156 | Wtyczka dźwięku Pulse dla biblioteki PTLib. | |
157 | ||
9eabec1b | 158 | %package video-v4l2 |
0154cba6 JB |
159 | Summary: v4l2 video input plugin for PTLib |
160 | Summary(pl.UTF-8): Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib | |
9eabec1b | 161 | Group: Libraries |
11b50e14 | 162 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9eabec1b | 163 | |
164 | %description video-v4l2 | |
0154cba6 | 165 | v4l2 video input plugin for PTLib. |
9eabec1b | 166 | |
8a20fb6a | 167 | %description video-v4l2 -l pl.UTF-8 |
0154cba6 | 168 | Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib. |
8a20fb6a | 169 | |
5fa46637 | 170 | %package video-avc |
0154cba6 JB |
171 | Summary: AVC 1394 video input plugin for PTLib |
172 | Summary(pl.UTF-8): Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib | |
173 | Group: Libraries | |
174 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
5fa46637 JK |
175 | |
176 | %description video-avc | |
0154cba6 JB |
177 | AVC 1394 video input plugin for PTLib. |
178 | ||
179 | %description video-avc -l pl.UTF-8 | |
180 | Wtyczka 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 | 229 | dir=$(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 |
239 | rm -rf $RPM_BUILD_ROOT | |
240 | ||
241 | install -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 | 247 | cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name} |
248 | ||
90a4e09b AM |
249 | sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak |
250 | ||
ef28a618 JK |
251 | chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.* |
252 | find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x | |
253 | ||
9eabec1b | 254 | %clean |
255 | rm -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 |