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