]> git.pld-linux.org Git - packages/opal.git/blob - opal.spec
- x32 rebuild
[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.10
33 Release:        4
34 License:        MPL v1.0
35 Group:          Libraries
36 Source0:        http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
37 # Source0-md5:  b923e1c75fe0643bdf7a4ad7b1bc8e20
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 Patch7:         ffmpeg2.patch
46 URL:            http://www.opalvoip.org/
47 BuildRequires:  autoconf >= 2.50
48 BuildRequires:  automake
49 %{?with_capi:BuildRequires:     capi4k-utils-devel}
50 %{?with_celt:BuildRequires:     celt-devel}
51 BuildRequires:  expat-devel
52 BuildRequires:  libstdc++-devel
53 %{?with_zrtp:BuildRequires:     libzrtp-devel}
54 BuildRequires:  pkgconfig
55 BuildRequires:  ptlib-devel >= 1:2.10.9
56 BuildRequires:  sed >= 4.0
57 BuildRequires:  speex-devel >= 1:1.2
58 BuildRequires:  speexdsp-devel >= 1.2
59 %{?with_srtp:BuildRequires:     srtp-devel}
60 %if %{without sip_fax_only}
61 BuildRequires:  SDL-devel
62 # libavcodec >= 51.11.0 libavutil
63 BuildRequires:  ffmpeg-devel
64 %{?with_java:BuildRequires:     jdk}
65 BuildRequires:  libgsm-devel
66 BuildRequires:  libtheora-devel
67 %{?with_vpb:BuildRequires:      vpb-devel}
68 # ABI 0.102
69 BuildRequires:  libx264-devel >= 0.1.3-1.20101031_2245.1
70 BuildRequires:  webrtc-libilbc-devel
71 BuildRequires:  openssl-devel
72 %{?with_ruby:BuildRequires:     ruby-devel}
73 BuildRequires:  spandsp-devel
74 BuildRequires:  swig
75 BuildRequires:  unixODBC-devel
76 %endif
77 %requires_eq    ptlib
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 %description
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
84 charge.
85
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.
91
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
104 %package devel
105 Summary:        Opal development files
106 Summary(pl.UTF-8):      Pliki dla developerów Opal
107 Group:          Development/Libraries
108 Requires:       %{name} = %{version}-%{release}
109 %{?with_capi:Requires:  capi4k-utils-devel}
110 Requires:       libstdc++-devel
111 %{?with_zrtp:Requires:  libzrtp-devel}
112 Requires:       ptlib-devel >= 1:2.10.9
113 Requires:       speex-devel >= 1:1.2
114 %{?with_srtp:Requires:  srtp-devel}
115
116 %description devel
117 Header files and libraries for developing applications that use OPAL.
118
119 %description devel -l pl.UTF-8
120 Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji
121 używających OPAL.
122
123 %package static
124 Summary:        OPAL static libraries
125 Summary(pl.UTF-8):      Biblioteki statyczne OPAL
126 Group:          Development/Libraries
127 Requires:       %{name}-devel = %{version}-%{release}
128
129 %description static
130 OPAL static libraries.
131
132 %description static -l pl.UTF-8
133 Biblioteki statyczne OPAL.
134
135 %prep
136 %setup -q
137 %patch0 -p1
138 %patch1 -p1
139 %patch2 -p1
140 %patch3 -p1
141 %patch4 -p1
142 %patch5 -p1
143 %patch6 -p1
144 %patch7 -p1
145
146 %build
147 PWLIBDIR=%{_prefix}; export PWLIBDIR
148 OPALDIR=`pwd`; export OPALDIR
149 OPAL_BUILD="yes"; export OPAL_BUILD
150 %{__aclocal}
151 %{__autoconf}
152 # don't run autoheader here, include/opal/buildopts.h.in is manually written
153 cd plugins
154 %{__aclocal}
155 %{__autoconf}
156 %{__autoheader}
157 cd ..
158 # Run  grep '^OPAL_.*=' configure.ac|grep 'yes\|no'  to check current defaults
159 %configure \
160         %{?with_java:JDK_ROOT=%{_jvmdir}/java} \
161 %if %{with sip_fax_only}
162         --disable-aec \
163         --disable-g711plc \
164         --disable-h224 \
165         --disable-h281 \
166         --disable-h323 \
167         --disable-h450 \
168         --disable-h460 \
169         --disable-h501 \
170         --disable-iax \
171         --disable-ivr \
172         --disable-lid \
173         --disable-plugins
174         --disable-rfc4103 \
175         --disable-rfc4175 \
176         --disable-sipim \
177         --disable-video \
178 %else
179         --enable-ixj \
180 %endif
181         %{!?with_capi:--disable-capi} \
182         %{!?with_celt:--disable-celt} \
183         %{!?with_java:--disable-java} \
184         %{!?with_ruby:--disable-ruby} \
185         %{!?with_srtp:--disable-srtp} \
186         %{?with_vpb:--enable-vpb} \
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
194
195 %{__make} %{?debug:debug}%{!?debug:opt} \
196         CC="%{__cc}" \
197         CPLUS="%{__cxx}" \
198         OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}" \
199         VERBOSE=1
200
201 %{__cp} -a */libopal* .
202 %if %{without sip_fax_only}
203 %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \
204         CC="%{__cc}" \
205         CPLUS="%{__cxx}" \
206         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \
207         LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal"
208 %endif
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT%{_bindir}
213
214 %{__make} install \
215         DESTDIR=$RPM_BUILD_ROOT
216
217 %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}}
218
219 # This needs to be done after 'make install'
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
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)
236 %attr(755,root,root) %{_libdir}/libopal.so.%{version}
237 %if %{without sip_fax_only}
238 %attr(755,root,root) %{_bindir}/simpleopal
239 %dir %{_libdir}/opal-%{version}
240 %dir %{_libdir}/opal-%{version}/codecs
241 %dir %{_libdir}/opal-%{version}/codecs/audio
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
254 %dir %{_libdir}/opal-%{version}/codecs/video
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
257 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin_helper
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
261 %dir %{_libdir}/opal-%{version}/fax
262 %attr(755,root,root) %{_libdir}/opal-%{version}/fax/spandsp_ptplugin.so
263 %dir %{_libdir}/opal-%{version}/lid
264 %attr(755,root,root) %{_libdir}/opal-%{version}/lid/ixj_lid_pwplugin.so
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
271 %endif
272
273 %files devel
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_libdir}/libopal.so
276 %{_includedir}/opal
277 %{_pkgconfigdir}/opal.pc
278
279 %files static
280 %defattr(644,root,root,755)
281 %{_libdir}/libopal_s.a
This page took 0.07551 seconds and 3 git commands to generate.