]>
Commit | Line | Data |
---|---|---|
4811172d | 1 | # TODO: |
a7e6bfef | 2 | # SBC plugin is missing bluez_sbc subdir |
c0a25d84 | 3 | # fix static libname (libopal_s.a) |
7d38eb5a | 4 | # MPEG4 rate control correction requires libavcodec sources |
9008d5d2 | 5 | # NOTE: IPv6 support requires IPv6 support in ptlib |
5683c404 | 6 | # |
383877b6 | 7 | # WARNING: opal version should match Ekiga and ptlib versions |
5b46c6b6 | 8 | # Recommendations: http://wiki.ekiga.org/index.php/Download_Ekiga_sources |
383877b6 | 9 | # |
12913987 | 10 | # Conditional build: |
9008d5d2 | 11 | %bcond_with sip_fax_only # minimal build for t38modem + SIP |
a7e6bfef | 12 | %bcond_without celt # CELT codec support |
9008d5d2 | 13 | %bcond_without srtp # SRTP protocol support (mutually exclusive with zrtp) |
cee58fd7 | 14 | %bcond_with zrtp # ZRTP protocol support (mutually exclusive with zrtp; broken as of 3.10.9) |
9008d5d2 | 15 | %bcond_without capi # CAPI support |
b3f5804c JB |
16 | %bcond_without vpb # Voicetronix VPB support |
17 | %bcond_with java # Java JNI interface (only swig wrapper, Java part not built) | |
18 | %bcond_with ruby # Ruby interface (very initial, only swig wrapper) | |
12913987 | 19 | # |
9008d5d2 JB |
20 | %if %{with zrtp} |
21 | %undefine with_srtp | |
22 | %endif | |
23 | %if %{with sip_fax_only} | |
b3f5804c JB |
24 | %undefine with_java |
25 | %undefine with_ruby | |
9008d5d2 JB |
26 | %undefine with_srtp |
27 | %undefine with_zrtp | |
28 | %endif | |
aaf12cf0 | 29 | Summary: Open Phone Abstraction Library (aka OpenH323 v2) |
075bc36b | 30 | Summary(pl.UTF-8): Biblioteka Open Phone Abstraction Library (aka OpenH323 v2) |
aaf12cf0 | 31 | Name: opal |
a7e6bfef JB |
32 | Version: 3.10.9 |
33 | Release: 1 | |
34 | License: MPL v1.0 | |
aaf12cf0 | 35 | Group: Libraries |
f7ddb932 | 36 | Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2 |
a7e6bfef | 37 | # Source0-md5: f5dee986b7ae0d840bcc502785ea5bd7 |
e377535f | 38 | Patch0: %{name}-build.patch |
a7e6bfef JB |
39 | Patch1: %{name}-ffmpeg10.patch |
40 | Patch2: %{name}-sh.patch | |
41 | Patch3: %{name}-libilbc.patch | |
42 | Patch4: %{name}-ah.patch | |
cee58fd7 | 43 | Patch5: %{name}-exceptions.patch |
b3f5804c | 44 | Patch6: %{name}-ruby.patch |
a7e6bfef JB |
45 | URL: http://www.opalvoip.org/ |
46 | BuildRequires: autoconf >= 2.50 | |
105bdcf7 | 47 | BuildRequires: automake |
9008d5d2 | 48 | %{?with_capi:BuildRequires: capi4k-utils-devel} |
24ae7846 | 49 | %{?with_celt:BuildRequires: celt-devel} |
105bdcf7 | 50 | BuildRequires: expat-devel |
12913987 | 51 | BuildRequires: libstdc++-devel |
cee58fd7 | 52 | %{?with_zrtp:BuildRequires: libzrtp-devel} |
12913987 | 53 | BuildRequires: pkgconfig |
a7e6bfef | 54 | BuildRequires: ptlib-devel >= 1:2.10.9 |
12913987 | 55 | BuildRequires: sed >= 4.0 |
9008d5d2 JB |
56 | # with speexdsp |
57 | BuildRequires: speex-devel >= 1:1.2 | |
58 | %{?with_srtp:BuildRequires: srtp-devel} | |
12913987 MM |
59 | %if %{without sip_fax_only} |
60 | BuildRequires: SDL-devel | |
a7e6bfef | 61 | # libavcodec >= 51.11.0 libavutil |
7d38eb5a | 62 | BuildRequires: ffmpeg-devel |
a7e6bfef | 63 | %{?with_java:BuildRequires: jdk} |
7d38eb5a | 64 | BuildRequires: libgsm-devel |
7d38eb5a | 65 | BuildRequires: libtheora-devel |
cee58fd7 | 66 | %{?with_vpb:BuildRequires: vpb-devel} |
a7e6bfef JB |
67 | # ABI 0.102 |
68 | BuildRequires: libx264-devel >= 0.1.3-1.20101031_2245.1 | |
b4fd80b4 | 69 | BuildRequires: webrtc-libilbc-devel |
fda4b81c | 70 | BuildRequires: openssl-devel |
a7e6bfef | 71 | %{?with_ruby:BuildRequires: ruby-devel} |
a7e6bfef JB |
72 | BuildRequires: spandsp-devel |
73 | BuildRequires: swig | |
105bdcf7 | 74 | BuildRequires: unixODBC-devel |
12913987 | 75 | %endif |
d2161d53 | 76 | %requires_eq ptlib |
aaf12cf0 PG |
77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
78 | ||
79 | %description | |
0a401c5c CM |
80 | The OPAL project aims to create a full featured, interoperable, Open |
81 | Source implementation of the ITU H.323 teleconferencing protocol that | |
82 | can be used by personal developers and commercial users without | |
aaf12cf0 PG |
83 | charge. |
84 | ||
a2a27970 JR |
85 | %description -l pl.UTF-8 |
86 | Celem projektu OPAL jest stworzenie w pełni funkcjonalnej i | |
87 | wyposażonej implementacji protokołu telekonferencyjnego ITU H.323, | |
88 | który może być używany przez użytkowników prywatnych i komercyjnych | |
89 | bez opłat. | |
aaf12cf0 | 90 | |
b3f5804c JB |
91 | %package lid-vpb |
92 | Summary: Opal LID plugin for Voicetronix VPB devices | |
93 | Summary(pl.UTF-8): Wtyczka Opal LID dla urządzeń VPB firmy Voicetronix | |
94 | Group: Libraries | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description lid-vpb | |
98 | Opal LID plugin for Voicetronix VPB devices. | |
99 | ||
100 | %description lid-vpb -l pl.UTF-8 | |
101 | Wtyczka Opal LID dla urządzeń VPB firmy Voicetronix. | |
102 | ||
aaf12cf0 PG |
103 | %package devel |
104 | Summary: Opal development files | |
075bc36b | 105 | Summary(pl.UTF-8): Pliki dla developerów Opal |
aaf12cf0 | 106 | Group: Development/Libraries |
5e9f9381 | 107 | Requires: %{name} = %{version}-%{release} |
9008d5d2 | 108 | %{?with_capi:Requires: capi4k-utils-devel} |
aaf12cf0 | 109 | Requires: libstdc++-devel |
cee58fd7 | 110 | %{?with_zrtp:Requires: libzrtp-devel} |
a7e6bfef | 111 | Requires: ptlib-devel >= 1:2.10.9 |
9008d5d2 JB |
112 | Requires: speex-devel >= 1:1.2 |
113 | %{?with_srtp:Requires: srtp-devel} | |
aaf12cf0 PG |
114 | |
115 | %description devel | |
0a401c5c | 116 | Header files and libraries for developing applications that use OPAL. |
aaf12cf0 | 117 | |
a2a27970 JR |
118 | %description devel -l pl.UTF-8 |
119 | Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji | |
120 | używających OPAL. | |
aaf12cf0 | 121 | |
0a847dbc | 122 | %package static |
296d779e | 123 | Summary: OPAL static libraries |
075bc36b | 124 | Summary(pl.UTF-8): Biblioteki statyczne OPAL |
0a847dbc | 125 | Group: Development/Libraries |
5e9f9381 | 126 | Requires: %{name}-devel = %{version}-%{release} |
aaf12cf0 | 127 | |
0a847dbc | 128 | %description static |
296d779e | 129 | OPAL static libraries. |
aaf12cf0 | 130 | |
a2a27970 | 131 | %description static -l pl.UTF-8 |
296d779e | 132 | Biblioteki statyczne OPAL. |
aaf12cf0 PG |
133 | |
134 | %prep | |
8db2f0fb | 135 | %setup -q |
e377535f JR |
136 | %patch0 -p1 |
137 | %patch1 -p1 | |
79955eae | 138 | %patch2 -p1 |
a7e6bfef JB |
139 | %patch3 -p1 |
140 | %patch4 -p1 | |
b3f5804c JB |
141 | %patch5 -p1 |
142 | %patch6 -p1 | |
aaf12cf0 PG |
143 | |
144 | %build | |
b0b5ec3f | 145 | PWLIBDIR=%{_prefix}; export PWLIBDIR |
296d779e | 146 | OPALDIR=`pwd`; export OPALDIR |
c1724659 | 147 | OPAL_BUILD="yes"; export OPAL_BUILD |
323ecc81 SS |
148 | %{__aclocal} |
149 | %{__autoconf} | |
a7e6bfef | 150 | # don't run autoheader here, include/opal/buildopts.h.in is manually written |
b8ea5cae | 151 | cd plugins |
0a401c5c | 152 | %{__aclocal} |
b8ea5cae | 153 | %{__autoconf} |
a7e6bfef | 154 | %{__autoheader} |
b8ea5cae | 155 | cd .. |
12913987 | 156 | # Run grep '^OPAL_.*=' configure.ac|grep 'yes\|no' to check current defaults |
7d38eb5a | 157 | %configure \ |
b3f5804c | 158 | %{?with_java:JDK_ROOT=%{_jvmdir}/java} \ |
12913987 | 159 | %if %{with sip_fax_only} |
a7e6bfef JB |
160 | --disable-aec \ |
161 | --disable-g711plc \ | |
12913987 MM |
162 | --disable-h224 \ |
163 | --disable-h281 \ | |
a7e6bfef | 164 | --disable-h323 \ |
12913987 MM |
165 | --disable-h450 \ |
166 | --disable-h460 \ | |
167 | --disable-h501 \ | |
a7e6bfef | 168 | --disable-iax \ |
12913987 | 169 | --disable-ivr \ |
a7e6bfef | 170 | --disable-lid \ |
12913987 | 171 | --disable-plugins |
a7e6bfef JB |
172 | --disable-rfc4103 \ |
173 | --disable-rfc4175 \ | |
174 | --disable-sipim \ | |
175 | --disable-video \ | |
12913987 | 176 | %else |
b3f5804c JB |
177 | --enable-ixj \ |
178 | %endif | |
9008d5d2 | 179 | %{!?with_capi:--disable-capi} \ |
a7e6bfef | 180 | %{!?with_celt:--disable-celt} \ |
b3f5804c JB |
181 | %{!?with_java:--disable-java} \ |
182 | %{!?with_ruby:--disable-ruby} \ | |
9008d5d2 JB |
183 | %{!?with_srtp:--disable-srtp} \ |
184 | %{?with_vpb:--enable-vpb} \ | |
cee58fd7 JB |
185 | %if %{with zrtp} |
186 | --enable-zrtp \ | |
187 | --with-bn-includedir=/usr/include \ | |
188 | --with-bn-libdir=%{_libdir} \ | |
189 | --with-zrtp-includedir=/usr/include/libzrtp \ | |
190 | --with-zrtp-libdir=%{_libdir} | |
191 | %endif | |
12913987 | 192 | |
c1724659 | 193 | %{__make} %{?debug:debug}%{!?debug:opt} \ |
296d779e JR |
194 | CC="%{__cc}" \ |
195 | CPLUS="%{__cxx}" \ | |
a7e6bfef JB |
196 | OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}" \ |
197 | VERBOSE=1 | |
b0b5ec3f | 198 | |
c0a25d84 | 199 | %{__cp} -a */libopal* . |
12913987 | 200 | %if %{without sip_fax_only} |
c1724659 | 201 | %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \ |
296d779e | 202 | CC="%{__cc}" \ |
5ce6a9aa | 203 | CPLUS="%{__cxx}" \ |
c0a25d84 SS |
204 | CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \ |
205 | LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal" | |
12913987 | 206 | %endif |
aaf12cf0 PG |
207 | |
208 | %install | |
209 | rm -rf $RPM_BUILD_ROOT | |
4733c726 | 210 | install -d $RPM_BUILD_ROOT%{_bindir} |
b0b5ec3f | 211 | |
212 | %{__make} install \ | |
213 | DESTDIR=$RPM_BUILD_ROOT | |
aaf12cf0 | 214 | |
12913987 MM |
215 | %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}} |
216 | ||
4a7dfbfa | 217 | # This needs to be done after 'make install' |
7057c46b JB |
218 | %{__sed} \ |
219 | -e 's,^OPALDIR.*=.*$,OPALDIR\t\t\t\t= %{_libdir}/opal-%{version},;' \ | |
220 | -e 's,^OPAL_SRCDIR.*=.*$,OPAL_SRCDIR\t\t\t= %{_usrsrc}/debug/opal-%{version},;' \ | |
221 | -e 's,^OPAL_INCDIR.*=.*$,OPAL_INCDIR\t\t\t= %{_includedir}/opal,;' \ | |
222 | -e 's,^OPAL_LIBDIR.*=.*$,OPAL_LIBDIR\t\t\t= %{_libdir},;' \ | |
223 | opal_defs.mak > $RPM_BUILD_ROOT%{_includedir}/opal/opal_defs.mak | |
224 | cp -p opal_inc.mak $RPM_BUILD_ROOT%{_includedir}/opal | |
aaf12cf0 PG |
225 | |
226 | %clean | |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
229 | %post -p /sbin/ldconfig | |
230 | %postun -p /sbin/ldconfig | |
231 | ||
232 | %files | |
233 | %defattr(644,root,root,755) | |
a7e6bfef | 234 | %attr(755,root,root) %{_libdir}/libopal.so.%{version} |
12913987 | 235 | %if %{without sip_fax_only} |
a7e6bfef | 236 | %attr(755,root,root) %{_bindir}/simpleopal |
0dd5a601 | 237 | %dir %{_libdir}/opal-%{version} |
238 | %dir %{_libdir}/opal-%{version}/codecs | |
239 | %dir %{_libdir}/opal-%{version}/codecs/audio | |
24ae7846 JR |
240 | %{?with_celt:%attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/celt_ptplugin.so} |
241 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g722_ptplugin.so | |
242 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g7221_ptplugin.so | |
243 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g7222_ptplugin.so | |
244 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g726_ptplugin.so | |
245 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/gsm0610_ptplugin.so | |
246 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/gsmamrcodec_ptplugin.so | |
247 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/iLBC_ptplugin.so | |
248 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/ima_adpcm_ptplugin.so | |
249 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/lpc10_ptplugin.so | |
250 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/silk_ptplugin.so | |
251 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/speex_ptplugin.so | |
a7e6bfef | 252 | %dir %{_libdir}/opal-%{version}/codecs/video |
24ae7846 JR |
253 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h261_vic_ptplugin.so |
254 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h263_ffmpeg_ptplugin.so | |
bc09e567 | 255 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin_helper |
24ae7846 JR |
256 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_x264_ptplugin.so |
257 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/mpeg4_ffmpeg_ptplugin.so | |
258 | %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/theora_ptplugin.so | |
a7e6bfef JB |
259 | %dir %{_libdir}/opal-%{version}/fax |
260 | %attr(755,root,root) %{_libdir}/opal-%{version}/fax/spandsp_ptplugin.so | |
261 | %dir %{_libdir}/opal-%{version}/lid | |
0dd5a601 | 262 | %attr(755,root,root) %{_libdir}/opal-%{version}/lid/ixj_lid_pwplugin.so |
b3f5804c JB |
263 | %endif |
264 | ||
265 | %if %{with vpb} | |
266 | %files lid-vpb | |
267 | %defattr(644,root,root,755) | |
268 | %attr(755,root,root) %{_libdir}/opal-%{version}/lid/vpb_ptplugin.so | |
12913987 | 269 | %endif |
aaf12cf0 PG |
270 | |
271 | %files devel | |
272 | %defattr(644,root,root,755) | |
a7e6bfef | 273 | %attr(755,root,root) %{_libdir}/libopal.so |
4733c726 SS |
274 | %{_includedir}/opal |
275 | %{_pkgconfigdir}/opal.pc | |
aaf12cf0 | 276 | |
296d779e JR |
277 | %files static |
278 | %defattr(644,root,root,755) | |
a7e6bfef | 279 | %{_libdir}/libopal_s.a |