2 # fix static libname (libopal_s.a)
3 # IPv6 support requires IPv6 support in ptlib
4 # x264+ffmpeg detection sucks - it doesn't work with --as-needed
5 # SpanDSP FAX support requires t38_indicator symbol
6 # MPEG4 rate control correction requires libavcodec sources
9 # WARNING: opal version should match Ekiga and ptlib versions
10 # Recommendations: http://wiki.ekiga.org/index.php/Download_Ekiga_sources
13 %bcond_with sip_fax_only # Minimal build for t38modem + SIP
14 %bcond_without celt # Build with CELT codec support
16 # Don't touch this! strip removes all symbols from library
17 %define no_install_post_strip 1
19 Summary: Open Phone Abstraction Library (aka OpenH323 v2)
20 Summary(pl.UTF-8): Biblioteka Open Phone Abstraction Library (aka OpenH323 v2)
26 URL: http://www.opalvoip.org
27 Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
28 # Source0-md5: b4907073e00889a9e7c6c49d41e4e2d4
29 Patch0: %{name}-libname.patch
30 Patch1: %{name}-mak_files.patch
31 Patch2: %{name}-ac.patch
32 Patch3: %{name}-build.patch
33 BuildRequires: autoconf
34 BuildRequires: automake
35 %{?with_celt:BuildRequires: celt-devel <= 0.8.1}
36 BuildRequires: expat-devel
37 BuildRequires: libstdc++-devel
38 BuildRequires: pkgconfig
39 BuildRequires: ptlib-devel >= 1:2.8.3
40 BuildRequires: sed >= 4.0
41 %{?with_celt:Requires: celt <= 0.8.1}
42 %if %{without sip_fax_only}
43 BuildRequires: SDL-devel
44 BuildRequires: ffmpeg-devel
45 BuildRequires: libgsm-devel
46 BuildRequires: libtheora-devel
47 BuildRequires: libx264-devel
48 BuildRequires: openssl-devel
49 BuildRequires: speex-devel >= 1:1.1.5
50 BuildRequires: unixODBC-devel
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define filterout_ld -Wl,--as-needed
58 The OPAL project aims to create a full featured, interoperable, Open
59 Source implementation of the ITU H.323 teleconferencing protocol that
60 can be used by personal developers and commercial users without
63 %description -l pl.UTF-8
64 Celem projektu OPAL jest stworzenie w pełni funkcjonalnej i
65 wyposażonej implementacji protokołu telekonferencyjnego ITU H.323,
66 który może być używany przez użytkowników prywatnych i komercyjnych
70 Summary: Opal development files
71 Summary(pl.UTF-8): Pliki dla developerów Opal
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
74 Requires: libstdc++-devel
78 Header files and libraries for developing applications that use OPAL.
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji
85 Summary: OPAL static libraries
86 Summary(pl.UTF-8): Biblioteki statyczne OPAL
87 Group: Development/Libraries
88 Requires: %{name}-devel = %{version}-%{release}
91 OPAL static libraries.
93 %description static -l pl.UTF-8
94 Biblioteki statyczne OPAL.
104 PWLIBDIR=%{_prefix}; export PWLIBDIR
105 OPALDIR=`pwd`; export OPALDIR
106 OPAL_BUILD="yes"; export OPAL_BUILD
113 # Run grep '^OPAL_.*=' configure.ac|grep 'yes\|no' to check current defaults
115 %if %{with sip_fax_only}
119 --enable-statistics \
138 %{!?with_celt:--disable-celt} \
143 %{__make} %{?debug:debug}%{!?debug:opt} \
146 OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}"
148 %{__cp} -a */libopal* .
149 %if %{without sip_fax_only}
150 %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \
153 CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \
154 LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal"
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT%{_bindir}
162 DESTDIR=$RPM_BUILD_ROOT
164 %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}}
166 # This needs to be done after 'make install'
168 's,^OPALDIR.*=.*$,OPALDIR\t\t\t\t= %{_libdir}/opal-%{version},;'\
169 's,^OPAL_SRCDIR.*=.*$,OPAL_SRCDIR\t\t\t= %{_usrsrc}/debug/opal-%{version},;'\
170 's,^OPAL_INCDIR.*=.*$,OPAL_INCDIR\t\t\t= %{_includedir}/opal,;'\
171 's,^OPAL_LIBDIR.*=.*$,OPAL_LIBDIR\t\t\t= %{_libdir},;' \
174 install opal_{inc,defs}.mak $RPM_BUILD_ROOT%{_includedir}/opal
177 rm -rf $RPM_BUILD_ROOT
179 %post -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/lib*.so.*.*
185 %if %{without sip_fax_only}
186 %attr(755,root,root) %{_bindir}/*
187 %dir %{_libdir}/opal-%{version}
188 %dir %{_libdir}/opal-%{version}/codecs
189 %dir %{_libdir}/opal-%{version}/codecs/audio
190 %dir %{_libdir}/opal-%{version}/codecs/video
191 %dir %{_libdir}/opal-%{version}/lid
192 %{?with_celt:%attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/celtcodec_pwplugin.so}
193 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g722_audio_pwplugin.so
194 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g726_audio_pwplugin.so
195 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/gsm0610_audio_pwplugin.so
196 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/gsmamrcodec_pwplugin.so
197 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/ilbc_audio_pwplugin.so
198 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/ima_adpcm_audio_pwplugin.so
199 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/lpc10_audio_pwplugin.so
200 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/speex_audio_pwplugin.so
201 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h261-vic_video_pwplugin.so
202 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h263-1998_video_pwplugin.so
203 #%attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h263-ffmpeg_video_pwplugin.so
204 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin_helper
205 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/h264_video_pwplugin.so
206 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/mpeg4-ffmpeg_video_pwplugin.so
207 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/video/theora_video_pwplugin.so
208 %attr(755,root,root) %{_libdir}/opal-%{version}/lid/ixj_lid_pwplugin.so
209 %attr(755,root,root) %{_libdir}/opal-%{version}/lid/vpb_lid_pwplugin.so
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/*.so
216 %{_pkgconfigdir}/opal.pc
219 %defattr(644,root,root,755)