]> git.pld-linux.org Git - packages/ptlib.git/blob - ptlib.spec
Release 4 (by relup.sh)
[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  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:        4
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 BuildRequires:  gstreamer-devel
42 %{?with_avc1394:BuildRequires:  libavc1394-devel}
43 %{?with_dc1394:BuildRequires:   libdc1394-devel < 2.0.0}
44 BuildRequires:  libstdc++-devel
45 %{?with_lua:BuildRequires:      lua-devel >= 5.4}
46 %{?with_ldap:BuildRequires:     openldap-devel}
47 %{?with_openssl:BuildRequires:  openssl-devel}
48 BuildRequires:  pkgconfig
49 %{?with_odbc:BuildRequires:     unixODBC-devel}
50 %if %{with plugins}
51 BuildRequires:  alsa-lib-devel
52 BuildRequires:  libv4l-devel
53 BuildRequires:  pulseaudio-devel
54 %endif
55 BuildConflicts: gstreamer0.10-devel
56 %{!?with_esd:Obsoletes: ptlib-sound-esd}
57 Obsoletes:      ptlib-video-v4l
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
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
82 %package devel
83 Summary:        PTLib (Portable Tools Library) development files
84 Summary(pl.UTF-8):      PTLib pliki deweloperskie
85 Group:          Development/Libraries
86 Requires:       %{name} = %{epoch}:%{version}-%{release}
87
88 %description devel
89 Header files and libraries for developing applications that use ptlib.
90
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
93
94 %package static
95 Summary:        PTLib (Portable Tools Library) static libraries
96 Summary(pl.UTF-8):      Biblioteki statyczne PTLib
97 Group:          Development/Libraries
98 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
99
100 %description static
101 PTLib (Portable Tools Library) static libraries.
102
103 %description static -l pl.UTF-8
104 Biblioteki statyczne PTLib.
105
106 %package sound-alsa
107 Summary:        ALSA audio plugin for PTLib
108 Summary(pl.UTF-8):      Wtyczka dźwięku ALSA dla biblioteki PTLib
109 Group:          Libraries
110 Requires:       %{name} = %{epoch}:%{version}-%{release}
111 Provides:       %{name}-sound
112
113 %description sound-alsa
114 ALSA audio plugin for PTLib.
115
116 %description sound-alsa -l pl.UTF-8
117 Wtyczka dźwięku ALSA dla biblioteki PTLib.
118
119 %package sound-esd
120 Summary:        EsounD audio plugin for PTLib
121 Summary(pl.UTF-8):      Wtyczka dźwięku EsounD dla biblioteki PTLib
122 Group:          Libraries
123 Requires:       %{name} = %{epoch}:%{version}-%{release}
124 Provides:       %{name}-sound
125
126 %description sound-esd
127 EsounD audio plugin for PTLib.
128
129 %description sound-esd -l pl.UTF-8
130 Wtyczka dźwięku EsounD dla biblioteki PTLib.
131
132 %package sound-oss
133 Summary:        OSS audio plugin for PTLib
134 Summary(pl.UTF-8):      Wtyczka dźwięku OSS dla biblioteki PTLib
135 Group:          Libraries
136 Requires:       %{name} = %{epoch}:%{version}-%{release}
137 Provides:       %{name}-sound
138
139 %description sound-oss
140 OSS audio plugin for PTLib.
141
142 %description sound-oss -l pl.UTF-8
143 Wtyczka dźwięku OSS dla biblioteki PTLib.
144
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
158 %package video-v4l2
159 Summary:        v4l2 video input plugin for PTLib
160 Summary(pl.UTF-8):      Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib
161 Group:          Libraries
162 Requires:       %{name} = %{epoch}:%{version}-%{release}
163
164 %description video-v4l2
165 v4l2 video input plugin for PTLib.
166
167 %description video-v4l2 -l pl.UTF-8
168 Wtyczka wejścia obrazu v4l2 dla biblioteki PTLib.
169
170 %package video-avc
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}
175
176 %description video-avc
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
181
182 %prep
183 %setup -q
184
185 %build
186 # note: --enable-opal influences most of the remaining enable/disable defaults
187 %configure \
188         STRIP=/bin/true \
189         DSYMUTIL=/bin/true \
190         --disable-v4l \
191 %if %{with plugins}
192         --enable-plugins \
193         --enable-alsa \
194         --enable-avc%{!?with_avc1394:=no} \
195         --enable-dc%{!?with_dc1394:=no} \
196         --enable-esd%{!?with_esd:=no} \
197         --enable-lua%{!?with_lua:=no} \
198         --enable-oss \
199         --enable-v4l2 \
200         --enable-pulse \
201 %else
202         --disable-plugins \
203         --disable-alsa \
204         --disable-avc \
205         --disable-dc \
206         --disable-esd \
207         --disable-oss \
208         --disable-v4l2 \
209 %endif
210 %if %{with http}
211         --enable-http \
212         --enable-httpforms \
213         --enable-httpsvc \
214 %else
215         --disable-http \
216         --disable-httpforms \
217         --disable-httpsvc \
218 %endif
219         --enable-ipv6%{!?with_ipv6:=no} \
220         --enable-odbc%{!?with_odbc:=no} \
221         --enable-openldap%{!?with_ldap:=no} \
222         --enable-openssl%{!?with_openssl:=no} \
223         --enable-resolver%{!?with_resolver:=no} \
224         --enable-sasl%{!?with_sasl:=no} \
225         --enable-video%{!?with_video:=no}
226
227 dir=$(pwd)
228 %{__make} \
229         V=1 \
230         PTLIBMAKEDIR="$dir/make" \
231         PTLIBDIR="$dir" \
232         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
233         LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
234         CXX="%{__cxx}"
235
236 %install
237 rm -rf $RPM_BUILD_ROOT
238
239 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
240
241 %{__make} install \
242         V=1 \
243         STRIP=/bin/true \
244         DESTDIR=$RPM_BUILD_ROOT
245
246 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
247
248 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
249
250 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
251 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
252
253 %clean
254 rm -rf $RPM_BUILD_ROOT
255
256 %post   -p /sbin/ldconfig
257 %postun -p /sbin/ldconfig
258
259 %files
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
262 %if %{with plugins}
263 %dir %{_libdir}/%{name}-%{version}
264 %dir %{_libdir}/%{name}-%{version}/device
265 %dir %{_libdir}/%{name}-%{version}/device/sound
266 %dir %{_libdir}/%{name}-%{version}/device/videoinput
267 %endif
268
269 %files devel
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/libpt.so
272 %{_includedir}/ptclib
273 %{_includedir}/ptlib
274 %{_includedir}/ptlib.h
275 %{_includedir}/ptlib_config.h
276 %{_includedir}/ptlib_wx.h
277 %dir %{_datadir}/%{name}
278 %dir %{_datadir}/%{name}/make
279 %{_datadir}/%{name}/make/*.mak
280 %{_pkgconfigdir}/ptlib.pc
281
282 %files static
283 %defattr(644,root,root,755)
284 %{_libdir}/libpt_s.a
285
286 %if %{with plugins}
287 %files sound-alsa
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/alsa_ptplugin.so
290
291 %if %{with esd}
292 %files sound-esd
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/esd_ptplugin.so
295 %endif
296
297 %files sound-oss
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/oss_ptplugin.so
300
301 %files sound-pulse
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/sound/pulse_ptplugin.so
304
305 %files video-v4l2
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/v4l2_ptplugin.so
308
309 %if %{with avc1394}
310 %files video-avc
311 %defattr(644,root,root,755)
312 %attr(755,root,root) %{_libdir}/%{name}-%{version}/device/videoinput/avc_ptplugin.so
313 %endif
314 %endif
This page took 0.107843 seconds and 3 git commands to generate.