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