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