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