]> git.pld-linux.org Git - packages/ptlib.git/blob - ptlib.spec
- fixes merge from PTLIB_2_8 branch (1.25-1.25.2.2):
[packages/ptlib.git] / ptlib.spec
1 #
2 # Conditional build:
3 %bcond_without  http            # Disable http support
4 %bcond_without  ipv6            # Disable ipv6 support
5 %bcond_without  odbc            # Disable ODBC support
6 %bcond_without  plugins         # Disable plugins support
7 %bcond_without  resolver        # Disable resolver support
8 %bcond_without  openssl         # Disable openssl support
9 %bcond_without  video           # Disable video support
10 #
11 Summary:        Portable Tools Library
12 Summary(pl.UTF-8):      Przenośna biblioteka narzędziowa
13 Name:           ptlib
14 Version:        2.10.0
15 Release:        1
16 URL:            http://www.opalvoip.org/
17 Source0:        http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
18 # Source0-md5:  39d53e09a698bd6099088b4465cfc841
19 Patch0:         %{name}-std_allocator.patch
20 License:        MPLv1.0
21 Group:          Libraries
22 %{?with_video:BuildRequires:    SDL-devel}
23 %if %{with plugins}
24 BuildRequires:  alsa-lib-devel
25 BuildRequires:  libv4l-devel
26 BuildRequires:  pulseaudio-devel
27 %endif
28 BuildRequires:  bison
29 BuildRequires:  expat-devel
30 BuildRequires:  flex
31 #BuildRequires: libavc1394-devel
32 #BuildRequires: libdc1394-devel < 2.0.0
33 BuildRequires:  libstdc++-devel
34 %{?with_openssl:BuildRequires:  openssl-devel}
35 BuildRequires:  pkgconfig
36 %{?with_odbc:BuildRequires:     unixODBC-devel}
37 Obsoletes:      ptlib-sound-esd
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 PTLib (Portable Tools Library) is a moderately large class library
42 that has it's genesis many years ago as PWLib (portable Windows
43 Library), a method to product applications to run on both Microsoft
44 Windows and Unix systems. It has also been ported to other systems
45 such as Mac OSX, VxWorks and other embedded systems.
46
47 It is supplied mainly to support the OPAL project, but that shouldn't
48 stop you from using it in whatever project you have in mind if you so
49 desire.
50
51 %description -l pl.UTF-8
52 PTLib (przenośna biblioteka narzędziowa) jest względnie dużą
53 biblioteką, która wywodzi się z PWLib (przenośna biblioteka Windows)
54 służącej do tworzenia aplikacji działających zarówno w systemach
55 Microsoft Windows jak i Unix. Została także przeniesiona na inne
56 systemy takie jak Mac OSX, VxWorks i inne wbudowane.
57
58 Zestaw ten powstał by wspierać projekt OPAL, to nie powinno jednak być
59 przeszkodą by móc go wykorzystać do innych celów jeśli tylko ktoś ma
60 na to ochotę.
61
62 %package devel
63 Summary:        PTLib (Portable Tools Library) development files
64 Summary(pl.UTF-8):      PTLib pliki deweloperskie
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68
69 %description devel
70 Header files and libraries for developing applications that use ptlib.
71
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe i biblioteki dla aplikacji korzystających z ptlib.
74
75 %package static
76 Summary:        PTLib (Portable Tools Library) static libraries
77 Summary(pl.UTF-8):      Biblioteki statyczne PTLib
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81
82 %description static
83 PTLib (Portable Tools Library) static libraries.
84
85 %description static -l pl.UTF-8
86 Biblioteki statyczne PTLib.
87
88 %package sound-alsa
89 Summary:        Alsa audio plugin
90 Summary(pl.UTF-8):      Alsa wtyczka audio
91 Group:          Libraries
92 Requires:       %{name} = %{version}-%{release}
93 Provides:       %{name}-sound
94
95 %description sound-alsa
96 Alsa audio plugin.
97
98 %description sound-alsa -l pl.UTF-8
99 Alsa wtyczka audio.
100
101 %package sound-pulse
102 Summary:        Pulse audio plugin
103 Summary(pl.UTF-8):      Pulse wtyczka audio
104 Group:          Libraries
105 Requires:       %{name} = %{version}-%{release}
106 Provides:       %{name}-sound
107
108 %description sound-pulse
109 Alsa audio plugin.
110
111 %description sound-pulse -l pl.UTF-8
112 Alsa wtyczka audio.
113
114 %package sound-oss
115 Summary:        OSS audio plugin
116 Summary(pl.UTF-8):      OSS wtyczka audio
117 Group:          Libraries
118 Requires:       %{name} = %{version}-%{release}
119 Provides:       %{name}-sound
120
121 %description sound-oss
122 OSS audio plugin.
123
124 %description sound-oss -l pl.UTF-8
125 OSS wtyczka audio.
126
127 %package video-v4l
128 Summary:        v4l video input plugin
129 Summary(pl.UTF-8):      v4l wejściowa wtyczka wideo
130 Group:          Libraries
131 Requires:       %{name} = %{version}-%{release}
132
133 %description video-v4l
134 v4l video input plugin.
135
136 %description video-v4l -l pl.UTF-8
137 v4l wejściowa wtyczka wideo.
138
139 %package video-v4l2
140 Summary:        v4l2 video input plugin
141 Summary(pl.UTF-8):      v4l2 wejściowa wtyczka wideo
142 Group:          Libraries
143 Requires:       %{name} = %{version}-%{release}
144
145 %description video-v4l2
146 v4l2 video input plugin.
147
148 %description video-v4l2 -l pl.UTF-8
149 v4l2 wejściowa wtyczka wideo.
150
151 #%package video-avc #Summary: AVC 1394 video input plugin #Group:
152 Libraries #Requires: %{name} = %{version}-%{release} # #%description
153 video-avc #AVC 1394 video input plugin.
154
155 %prep
156 %setup -q
157 %patch0 -p1
158
159 %build
160 # note: --enable-opal influences most of the remaining enable/disable defaults
161 %configure \
162                 --prefix=%{_prefix} \
163                 --enable-opal \
164 %if %{with plugins}
165                 --enable-plugins \
166                 --enable-alsa \
167                 --enable-oss \
168                 --enable-v4l2 \
169                 --enable-v4l \
170 %else
171                 --disable-plugins \
172                 --disable-alsa \
173                 --disable-oss \
174                 --disable-v4l2 \
175                 --disable-v4l \
176 %endif
177                 --disable-esd \
178 %if %{with http}
179                 --enable-http \
180                 --enable-httpforms \
181                 --enable-httpsvc \
182 %else
183                 --disable-http \
184                 --disable-httpforms \
185                 --disable-httpsvc \
186 %endif
187                 --%{?with_ipv6:en}%{!?with_ipv6:dis}able-ipv6 \
188                 --%{?with_odbc:en}%{!?with_odbc:dis}able-odbc \
189                 --%{?with_resolver:en}%{!?with_resolver:dis}able-resolver \
190                 --%{?with_openssl:en}%{!?with_openssl:dis}able-openssl \
191                 --%{?with_video:en}%{!?with_video:dis}able-video \
192                 --disable-avc \
193                 --disable-dc \
194                 --enable-debug
195
196
197 dir=$(pwd)
198 %{__make} %{?debug:debugshared}%{!?debug:optshared} \
199         V=1 \
200         PTLIBMAKEDIR="$dir/make" \
201         PTLIBDIR="$dir" \
202         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
203         LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
204         CXX="%{__cxx}"
205
206
207 %install
208 rm -rf $RPM_BUILD_ROOT
209
210 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/%{name}}
211
212 dir=$(pwd)
213 %{__make} install \
214         V=1 \
215         DESTDIR=$RPM_BUILD_ROOT
216
217 cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
218
219 sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
220
221 chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
222 find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
223
224 %clean
225 rm -rf $RPM_BUILD_ROOT
226
227 %post -p /sbin/ldconfig
228 %postun -p /sbin/ldconfig
229
230 %files
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/libpt.so.*.*.*
233 %if %{with plugins}
234 %dir %{_libdir}/%{name}-%{version}
235 %dir %{_libdir}/%{name}-%{version}/devices
236 %dir %{_libdir}/%{name}-%{version}/devices/sound
237 %dir %{_libdir}/%{name}-%{version}/devices/videoinput
238 %endif
239
240 %files devel
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libpt*.so
243 %dir %{_datadir}/%{name}
244 %dir %{_datadir}/%{name}/make
245 %attr(755,root,root) %{_bindir}/*
246 %attr(755,root,root) %{_datadir}/%{name}/make/%{name}-config
247 %{_includedir}/ptclib
248 %{_includedir}/ptlib
249 %{_includedir}/*.h
250 %{_datadir}/%{name}/make/*.mak
251 %{_pkgconfigdir}/%{name}.pc
252
253 %files static
254 %defattr(644,root,root,755)
255 %{_libdir}/lib*.a
256
257 %if %{with plugins}
258 %files sound-alsa
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/alsa_pwplugin.so
261
262 %files sound-pulse
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/pulse_pwplugin.so
265
266 %files sound-oss
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/sound/oss_pwplugin.so
269
270 %files video-v4l
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/v4l_pwplugin.so
273
274 %files video-v4l2
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/v4l2_pwplugin.so
277
278 #%files video-avc
279 #%defattr(644,root,root,755)
280 #%attr(755,root,root) %{_libdir}/%{name}-%{version}/devices/videoinput/avc_pwplugin.so
281 %endif
This page took 0.079436 seconds and 3 git commands to generate.