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