]> git.pld-linux.org Git - packages/opal.git/blob - opal.spec
- changed exceptions patch so that it affects only vpb plugin;
[packages/opal.git] / opal.spec
1 # TODO:
2 #       SBC plugin is missing bluez_sbc subdir
3 #       fix static libname (libopal_s.a)
4 #       MPEG4 rate control correction requires libavcodec sources
5 # NOTE: IPv6 support requires IPv6 support in ptlib
6 #
7 # WARNING: opal version should match Ekiga and ptlib versions
8 #       Recommendations: http://wiki.ekiga.org/index.php/Download_Ekiga_sources
9 #
10 # Conditional build:
11 %bcond_with     sip_fax_only    # minimal build for t38modem + SIP
12 %bcond_without  celt            # CELT codec support
13 %bcond_without  srtp            # SRTP protocol support (mutually exclusive with zrtp)
14 %bcond_with     zrtp            # ZRTP protocol support (mutually exclusive with zrtp; broken as of 3.10.9)
15 %bcond_without  capi            # CAPI support
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)
19 #
20 %if %{with zrtp}
21 %undefine       with_srtp
22 %endif
23 %if %{with sip_fax_only}
24 %undefine       with_java
25 %undefine       with_ruby
26 %undefine       with_srtp
27 %undefine       with_zrtp
28 %endif
29 Summary:        Open Phone Abstraction Library (aka OpenH323 v2)
30 Summary(pl.UTF-8):      Biblioteka Open Phone Abstraction Library (aka OpenH323 v2)
31 Name:           opal
32 Version:        3.10.9
33 Release:        1
34 License:        MPL v1.0
35 Group:          Libraries
36 Source0:        http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
37 # Source0-md5:  f5dee986b7ae0d840bcc502785ea5bd7
38 Patch0:         %{name}-build.patch
39 Patch1:         %{name}-ffmpeg10.patch
40 Patch2:         %{name}-sh.patch
41 Patch3:         %{name}-libilbc.patch
42 Patch4:         %{name}-ah.patch
43 Patch5:         %{name}-exceptions.patch
44 Patch6:         %{name}-ruby.patch
45 URL:            http://www.opalvoip.org/
46 BuildRequires:  autoconf >= 2.50
47 BuildRequires:  automake
48 %{?with_capi:BuildRequires:     capi4k-utils-devel}
49 %{?with_celt:BuildRequires:     celt-devel}
50 BuildRequires:  expat-devel
51 BuildRequires:  libstdc++-devel
52 %{?with_zrtp:BuildRequires:     libzrtp-devel}
53 BuildRequires:  pkgconfig
54 BuildRequires:  ptlib-devel >= 1:2.10.9
55 BuildRequires:  sed >= 4.0
56 # with speexdsp
57 BuildRequires:  speex-devel >= 1:1.2
58 %{?with_srtp:BuildRequires:     srtp-devel}
59 %if %{without sip_fax_only}
60 BuildRequires:  SDL-devel
61 # libavcodec >= 51.11.0 libavutil
62 BuildRequires:  ffmpeg-devel
63 %{?with_java:BuildRequires:     jdk}
64 BuildRequires:  libgsm-devel
65 BuildRequires:  libtheora-devel
66 %{?with_vpb:BuildRequires:      vpb-devel}
67 # ABI 0.102
68 BuildRequires:  libx264-devel >= 0.1.3-1.20101031_2245.1
69 BuildRequires:  webrtc-libilbc-devel
70 BuildRequires:  openssl-devel
71 %{?with_ruby:BuildRequires:     ruby-devel}
72 BuildRequires:  spandsp-devel
73 BuildRequires:  swig
74 BuildRequires:  unixODBC-devel
75 %endif
76 %requires_eq    ptlib
77 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79 %description
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
83 charge.
84
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.
90
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
103 %package devel
104 Summary:        Opal development files
105 Summary(pl.UTF-8):      Pliki dla developerów Opal
106 Group:          Development/Libraries
107 Requires:       %{name} = %{version}-%{release}
108 %{?with_capi:Requires:  capi4k-utils-devel}
109 Requires:       libstdc++-devel
110 %{?with_zrtp:Requires:  libzrtp-devel}
111 Requires:       ptlib-devel >= 1:2.10.9
112 Requires:       speex-devel >= 1:1.2
113 %{?with_srtp:Requires:  srtp-devel}
114
115 %description devel
116 Header files and libraries for developing applications that use OPAL.
117
118 %description devel -l pl.UTF-8
119 Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji
120 używających OPAL.
121
122 %package static
123 Summary:        OPAL static libraries
124 Summary(pl.UTF-8):      Biblioteki statyczne OPAL
125 Group:          Development/Libraries
126 Requires:       %{name}-devel = %{version}-%{release}
127
128 %description static
129 OPAL static libraries.
130
131 %description static -l pl.UTF-8
132 Biblioteki statyczne OPAL.
133
134 %prep
135 %setup -q
136 %patch0 -p1
137 %patch1 -p1
138 %patch2 -p1
139 %patch3 -p1
140 %patch4 -p1
141 %patch5 -p1
142 %patch6 -p1
143
144 %build
145 PWLIBDIR=%{_prefix}; export PWLIBDIR
146 OPALDIR=`pwd`; export OPALDIR
147 OPAL_BUILD="yes"; export OPAL_BUILD
148 %{__aclocal}
149 %{__autoconf}
150 # don't run autoheader here, include/opal/buildopts.h.in is manually written
151 cd plugins
152 %{__aclocal}
153 %{__autoconf}
154 %{__autoheader}
155 cd ..
156 # Run  grep '^OPAL_.*=' configure.ac|grep 'yes\|no'  to check current defaults
157 %configure \
158         %{?with_java:JDK_ROOT=%{_jvmdir}/java} \
159 %if %{with sip_fax_only}
160         --disable-aec \
161         --disable-g711plc \
162         --disable-h224 \
163         --disable-h281 \
164         --disable-h323 \
165         --disable-h450 \
166         --disable-h460 \
167         --disable-h501 \
168         --disable-iax \
169         --disable-ivr \
170         --disable-lid \
171         --disable-plugins
172         --disable-rfc4103 \
173         --disable-rfc4175 \
174         --disable-sipim \
175         --disable-video \
176 %else
177         --enable-ixj \
178 %endif
179         %{!?with_capi:--disable-capi} \
180         %{!?with_celt:--disable-celt} \
181         %{!?with_java:--disable-java} \
182         %{!?with_ruby:--disable-ruby} \
183         %{!?with_srtp:--disable-srtp} \
184         %{?with_vpb:--enable-vpb} \
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
192
193 %{__make} %{?debug:debug}%{!?debug:opt} \
194         CC="%{__cc}" \
195         CPLUS="%{__cxx}" \
196         OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}" \
197         VERBOSE=1
198
199 %{__cp} -a */libopal* .
200 %if %{without sip_fax_only}
201 %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \
202         CC="%{__cc}" \
203         CPLUS="%{__cxx}" \
204         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \
205         LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal"
206 %endif
207
208 %install
209 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT%{_bindir}
211
212 %{__make} install \
213         DESTDIR=$RPM_BUILD_ROOT
214
215 %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}}
216
217 # This needs to be done after 'make install'
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
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)
234 %attr(755,root,root) %{_libdir}/libopal.so.%{version}
235 %if %{without sip_fax_only}
236 %attr(755,root,root) %{_bindir}/simpleopal
237 %dir %{_libdir}/opal-%{version}
238 %dir %{_libdir}/opal-%{version}/codecs
239 %dir %{_libdir}/opal-%{version}/codecs/audio
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
252 %dir %{_libdir}/opal-%{version}/codecs/video
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
255 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin_helper
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
259 %dir %{_libdir}/opal-%{version}/fax
260 %attr(755,root,root) %{_libdir}/opal-%{version}/fax/spandsp_ptplugin.so
261 %dir %{_libdir}/opal-%{version}/lid
262 %attr(755,root,root) %{_libdir}/opal-%{version}/lid/ixj_lid_pwplugin.so
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
269 %endif
270
271 %files devel
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_libdir}/libopal.so
274 %{_includedir}/opal
275 %{_pkgconfigdir}/opal.pc
276
277 %files static
278 %defattr(644,root,root,755)
279 %{_libdir}/libopal_s.a
This page took 0.208371 seconds and 3 git commands to generate.