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