]> git.pld-linux.org Git - packages/opal.git/blob - opal.spec
- updated to 3.10.9
[packages/opal.git] / opal.spec
1 # TODO:
2 #       SBC plugin is missing bluez_sbc subdir
3 #       fix static libname (libopal_s.a)
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
9 #       VPB support (--enable-libvpb, needs exceptions enabled in ptlib, BR: libvpb)
10 #
11 # WARNING: opal version should match Ekiga and ptlib versions
12 #      Recommendations: http://wiki.ekiga.org/index.php/Download_Ekiga_sources
13 #
14 # Conditional build:
15 %bcond_with     sip_fax_only    # Minimal build for t38modem + SIP
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
22 #
23 # Don't touch this! strip removes all symbols from library
24 %define         no_install_post_strip           1
25 #
26 Summary:        Open Phone Abstraction Library (aka OpenH323 v2)
27 Summary(pl.UTF-8):      Biblioteka Open Phone Abstraction Library (aka OpenH323 v2)
28 Name:           opal
29 Version:        3.10.9
30 Release:        1
31 License:        MPL v1.0
32 Group:          Libraries
33 Source0:        http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
34 # Source0-md5:  f5dee986b7ae0d840bcc502785ea5bd7
35 Patch0:         %{name}-build.patch
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
42 BuildRequires:  automake
43 %{?with_celt:BuildRequires:     celt-devel}
44 BuildRequires:  expat-devel
45 BuildRequires:  libstdc++-devel
46 BuildRequires:  pkgconfig
47 BuildRequires:  ptlib-devel >= 1:2.10.9
48 BuildRequires:  sed >= 4.0
49 %if %{without sip_fax_only}
50 BuildRequires:  SDL-devel
51 # libavcodec >= 51.11.0 libavutil
52 BuildRequires:  ffmpeg-devel
53 %{?with_java:BuildRequires:     jdk}
54 BuildRequires:  libgsm-devel
55 BuildRequires:  libtheora-devel
56 # ABI 0.102
57 BuildRequires:  libx264-devel >= 0.1.3-1.20101031_2245.1
58 BuildRequires:  webrtc-libilbc-devel
59 BuildRequires:  openssl-devel
60 %{?with_ruby:BuildRequires:     ruby-devel}
61 # with speexdsp
62 BuildRequires:  speex-devel >= 1:1.2
63 BuildRequires:  spandsp-devel
64 BuildRequires:  swig
65 BuildRequires:  unixODBC-devel
66 %endif
67 %requires_eq    ptlib
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %define         filterout_ld    -Wl,--as-needed
71
72 %description
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
76 charge.
77
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.
83
84 %package devel
85 Summary:        Opal development files
86 Summary(pl.UTF-8):      Pliki dla developerów Opal
87 Group:          Development/Libraries
88 Requires:       %{name} = %{version}-%{release}
89 Requires:       libstdc++-devel
90 Requires:       ptlib-devel >= 1:2.10.9
91
92 %description devel
93 Header files and libraries for developing applications that use OPAL.
94
95 %description devel -l pl.UTF-8
96 Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji
97 używających OPAL.
98
99 %package static
100 Summary:        OPAL static libraries
101 Summary(pl.UTF-8):      Biblioteki statyczne OPAL
102 Group:          Development/Libraries
103 Requires:       %{name}-devel = %{version}-%{release}
104
105 %description static
106 OPAL static libraries.
107
108 %description static -l pl.UTF-8
109 Biblioteki statyczne OPAL.
110
111 %prep
112 %setup -q
113 %patch0 -p1
114 %patch1 -p1
115 %patch2 -p1
116 %patch3 -p1
117 %patch4 -p1
118
119 %build
120 PWLIBDIR=%{_prefix}; export PWLIBDIR
121 OPALDIR=`pwd`; export OPALDIR
122 OPAL_BUILD="yes"; export OPAL_BUILD
123 %{__aclocal}
124 %{__autoconf}
125 # don't run autoheader here, include/opal/buildopts.h.in is manually written
126 cd plugins
127 %{__aclocal}
128 %{__autoconf}
129 %{__autoheader}
130 cd ..
131 # Run  grep '^OPAL_.*=' configure.ac|grep 'yes\|no'  to check current defaults
132 %configure \
133 %if %{with sip_fax_only}
134         --disable-aec \
135         --disable-g711plc \
136         --disable-h224 \
137         --disable-h281 \
138         --disable-h323 \
139         --disable-h450 \
140         --disable-h460 \
141         --disable-h501 \
142         --disable-iax \
143         --disable-ivr \
144         --disable-java \
145         --disable-lid \
146         --disable-plugins
147         --disable-rfc4103 \
148         --disable-rfc4175 \
149         --disable-sipim \
150         --disable-video \
151 %else
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}
159 %endif
160
161 %{__make} %{?debug:debug}%{!?debug:opt} \
162         CC="%{__cc}" \
163         CPLUS="%{__cxx}" \
164         OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}" \
165         VERBOSE=1
166
167 %{__cp} -a */libopal* .
168 %if %{without sip_fax_only}
169 %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \
170         CC="%{__cc}" \
171         CPLUS="%{__cxx}" \
172         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \
173         LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal"
174 %endif
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT%{_bindir}
179
180 %{__make} install \
181         DESTDIR=$RPM_BUILD_ROOT
182
183 %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}}
184
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
193 install opal_{inc,defs}.mak $RPM_BUILD_ROOT%{_includedir}/opal
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)
203 %attr(755,root,root) %{_libdir}/libopal.so.%{version}
204 %if %{without sip_fax_only}
205 %attr(755,root,root) %{_bindir}/simpleopal
206 %dir %{_libdir}/opal-%{version}
207 %dir %{_libdir}/opal-%{version}/codecs
208 %dir %{_libdir}/opal-%{version}/codecs/audio
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
221 %dir %{_libdir}/opal-%{version}/codecs/video
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
224 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin_helper
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
228 %dir %{_libdir}/opal-%{version}/fax
229 %attr(755,root,root) %{_libdir}/opal-%{version}/fax/spandsp_ptplugin.so
230 %dir %{_libdir}/opal-%{version}/lid
231 %attr(755,root,root) %{_libdir}/opal-%{version}/lid/ixj_lid_pwplugin.so
232 #%attr(755,root,root) %{_libdir}/opal-%{version}/lid/vpb_lid_pwplugin.so
233 %endif
234
235 %files devel
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libopal.so
238 %{_includedir}/opal
239 %{_pkgconfigdir}/opal.pc
240
241 %files static
242 %defattr(644,root,root,755)
243 %{_libdir}/libopal_s.a
This page took 0.121063 seconds and 4 git commands to generate.