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