]> git.pld-linux.org Git - SPECS.git/blob - ptlib.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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  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]
21 #
22 Summary:        Portable Tools Library
23 Summary(pl.UTF-8):      Przenośna biblioteka narzędziowa
24 Name:           ptlib
25 Version:        2.18.6
26 Release:        1
27 Epoch:          1
28 License:        MPL v1.0
29 Group:          Libraries
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
36 BuildRequires:  bison
37 %{?with_sasl:BuildRequires:     cyrus-sasl-devel}
38 %{?with_esd:BuildRequires:      esound-devel}
39 BuildRequires:  expat-devel
40 BuildRequires:  flex
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}
49 %if %{with plugins}
50 BuildRequires:  alsa-lib-devel
51 BuildRequires:  libv4l-devel
52 BuildRequires:  pulseaudio-devel
53 %endif
54 %{!?with_esd:Obsoletes: ptlib-sound-esd}
55 Obsoletes:      ptlib-video-v4l
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
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.
64
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
67 desire.
68
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.
75
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
78 na to ochotę.
79
80 %package devel
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}
85
86 %description devel
87 Header files and libraries for developing applications that use ptlib.
88
89 %description devel -l pl.UTF-8
90 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
91
92 %package static
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}
97
98 %description static
99 PTLib (Portable Tools Library) static libraries.
100
101 %description static -l pl.UTF-8
102 Biblioteki statyczne PTLib.
103
104 %package sound-alsa
105 Summary:        ALSA audio plugin for PTLib
106 Summary(pl.UTF-8):      Wtyczka dźwięku ALSA dla biblioteki PTLib
107 Group:          Libraries
108 Requires:       %{name} = %{epoch}:%{version}-%{release}
109 Provides:       %{name}-sound
110
111 %description sound-alsa
112 ALSA audio plugin for PTLib.
113
114 %description sound-alsa -l pl.UTF-8
115 Wtyczka dźwięku ALSA dla biblioteki PTLib.
116
117 %package sound-esd
118 Summary:        EsounD audio plugin for PTLib
119 Summary(pl.UTF-8):      Wtyczka dźwięku EsounD dla biblioteki PTLib
120 Group:          Libraries
121 Requires:       %{name} = %{epoch}:%{version}-%{release}
122 Provides:       %{name}-sound
123
124 %description sound-esd
125 EsounD audio plugin for PTLib.
126
127 %description sound-esd -l pl.UTF-8
128 Wtyczka dźwięku EsounD dla biblioteki PTLib.
129
130 %package sound-oss
131 Summary:        OSS audio plugin for PTLib
132 Summary(pl.UTF-8):      Wtyczka dźwięku OSS dla biblioteki PTLib
133 Group:          Libraries
134 Requires:       %{name} = %{epoch}:%{version}-%{release}
135 Provides:       %{name}-sound
136
137 %description sound-oss
138 OSS audio plugin for PTLib.
139
140 %description sound-oss -l pl.UTF-8
141 Wtyczka dźwięku OSS dla biblioteki PTLib.
142
143 %package sound-pulse
144 Summary:        Pulse audio plugin for PTLib
145 Summary(pl.UTF-8):      Wtyczka dźwięku Pulse dla biblioteki PTLib
146 Group:          Libraries
147 Requires:       %{name} = %{epoch}:%{version}-%{release}
148 Provides:       %{name}-sound
149
150 %description sound-pulse
151 Pulse audio plugin for PTLib.
152
153 %description sound-pulse -l pl.UTF-8
154 Wtyczka dźwięku Pulse dla biblioteki PTLib.
155
156 %package video-v4l2
157 Summary:        v4l2 video input plugin for PTLib
158 Summary(pl.UTF-8):      Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
159 Group:          Libraries
160 Requires:       %{name} = %{epoch}:%{version}-%{release}
161
162 %description video-v4l2
163 v4l2 video input plugin for PTLib.
164
165 %description video-v4l2 -l pl.UTF-8
166 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
167
168 %package video-avc
169 Summary:        AVC 1394 video input plugin for PTLib
170 Summary(pl.UTF-8):      Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
171 Group:          Libraries
172 Requires:       %{name} = %{epoch}:%{version}-%{release}
173
174 %description video-avc
175 AVC 1394 video input plugin for PTLib.
176
177 %description video-avc -l pl.UTF-8
178 Wtyczka wejścia obrazu AVC 1394 dla biblioteki PTLib
179
180 %prep
181 %setup -q
182
183 %build
184 # note: --enable-opal influences most of the remaining enable/disable defaults
185 %configure \
186         DSYMUTIL=/bin/true \
187         --disable-v4l \
188 %if %{with plugins}
189         --enable-plugins \
190         --enable-alsa \
191         --enable-avc%{!?with_avc1394:=no} \
192         --enable-dc%{!?with_dc1394:=no} \
193         --enable-esd%{!?with_esd:=no} \
194         --enable-lua%{!?with_lua:=no} \
195         --enable-oss \
196         --enable-v4l2 \
197         --enable-pulse \
198 %else
199         --disable-plugins \
200         --disable-alsa \
201         --disable-avc \
202         --disable-dc \
203         --disable-esd \
204         --disable-oss \
205         --disable-v4l2 \
206 %endif
207 %if %{with http}
208         --enable-http \
209         --enable-httpforms \
210         --enable-httpsvc \
211 %else
212         --disable-http \
213         --disable-httpforms \
214         --disable-httpsvc \
215 %endif
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}
223
224 dir=$(pwd)
225 %{__make} \
226         V=1 \
227         PTLIBMAKEDIR="$dir/make" \
228         PTLIBDIR="$dir" \
229         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
230         LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
231         CXX="%{__cxx}"
232
233 %install
234 rm -rf $RPM_BUILD_ROOT
235
236 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
237
238 %{__make} install \
239         V=1 \
240         DESTDIR=$RPM_BUILD_ROOT
241
242 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
243
244 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
245
246 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
247 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
248
249 %clean
250 rm -rf $RPM_BUILD_ROOT
251
252 %post   -p /sbin/ldconfig
253 %postun -p /sbin/ldconfig
254
255 %files
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
258 %if %{with plugins}
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
263 %endif
264
265 %files devel
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/libpt.so
268 %{_includedir}/ptclib
269 %{_includedir}/ptlib
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
277
278 %files static
279 %defattr(644,root,root,755)
280 %{_libdir}/libpt_s.a
281
282 %if %{with plugins}
283 %files sound-alsa
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
286
287 %if %{with esd}
288 %files sound-esd
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
291 %endif
292
293 %files sound-oss
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
296
297 %files sound-pulse
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
300
301 %files video-v4l2
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
304
305 %if %{with avc1394}
306 %files video-avc
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so
309 %endif
310 %endif
This page took 2.837282 seconds and 3 git commands to generate.