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