]> git.pld-linux.org Git - packages/opal.git/blob - opal.spec
- up to 3.10.8
[packages/opal.git] / opal.spec
1 # TODO:
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
7 #       CAPI support
8 #
9 # WARNING: opal version should match Ekiga and ptlib versions
10 #      Recommendations: http://wiki.ekiga.org/index.php/Download_Ekiga_sources
11 #
12 # Conditional build:
13 %bcond_with     sip_fax_only    # Minimal build for t38modem + SIP
14 %bcond_without  celt            # Build with CELT codec support
15 #
16 # Don't touch this! strip removes all symbols from library
17 %define         no_install_post_strip           1
18 #
19 Summary:        Open Phone Abstraction Library (aka OpenH323 v2)
20 Summary(pl.UTF-8):      Biblioteka Open Phone Abstraction Library (aka OpenH323 v2)
21 Name:           opal
22 Version:        3.10.8
23 Release:        0.1
24 License:        MPL
25 Group:          Libraries
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
51 %endif
52 %requires_eq    ptlib
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         filterout_ld    -Wl,--as-needed
56
57 %description
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
61 charge.
62
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
67 bez opłat.
68
69 %package devel
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
75 Requires:       ptlib-devel
76
77 %description devel
78 Header files and libraries for developing applications that use OPAL.
79
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe i biblioteki konieczne do rozwoju aplikacji
82 używających OPAL.
83
84 %package static
85 Summary:        OPAL static libraries
86 Summary(pl.UTF-8):      Biblioteki statyczne OPAL
87 Group:          Development/Libraries
88 Requires:       %{name}-devel = %{version}-%{release}
89
90 %description static
91 OPAL static libraries.
92
93 %description static -l pl.UTF-8
94 Biblioteki statyczne OPAL.
95
96 %prep
97 %setup -q
98 #patch0 -p1
99 #patch1 -p1
100 #patch2 -p1
101 %patch3 -p1
102
103 %build
104 PWLIBDIR=%{_prefix}; export PWLIBDIR
105 OPALDIR=`pwd`; export OPALDIR
106 OPAL_BUILD="yes"; export OPAL_BUILD
107 %{__aclocal}
108 %{__autoconf}
109 cd plugins
110 %{__aclocal}
111 %{__autoconf}
112 cd ..
113 # Run  grep '^OPAL_.*=' configure.ac|grep 'yes\|no'  to check current defaults
114 %configure \
115 %if %{with sip_fax_only}
116         --enable-sip \
117         --enable-t38 \
118         --enable-fax \
119         --enable-statistics \
120         --disable-java \
121         --disable-video \
122         --disable-h323 \
123         --disable-iax \
124         --disable-h224 \
125         --disable-h281 \
126         --disable-sipim \
127         --disable-rfc4103 \
128         --disable-h450 \
129         --disable-h460 \
130         --disable-h501 \
131         --disable-lid \
132         --disable-ivr \
133         --disable-rfc4175 \
134         --disable-aec \
135         --disable-g711plc \
136         --disable-plugins
137 %else
138 %{!?with_celt:--disable-celt} \
139         --enable-ixj
140 %endif
141
142
143 %{__make} %{?debug:debug}%{!?debug:opt} \
144         CC="%{__cc}" \
145         CPLUS="%{__cxx}" \
146         OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}"
147
148 %{__cp} -a */libopal* .
149 %if %{without sip_fax_only}
150 %{__make} -C samples/simple %{?debug:debug}%{!?debug:opt} \
151         CC="%{__cc}" \
152         CPLUS="%{__cxx}" \
153         CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -I`pwd`/include" \
154         LDFLAGS="%{rpmldflags} -L`pwd` -lpt -lopal"
155 %endif
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT%{_bindir}
160
161 %{__make} install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 %{!?with_sip_fax_only:install samples/simple/obj/simpleopal $RPM_BUILD_ROOT%{_bindir}}
165
166 # This needs to be done after 'make install'
167 sed -i -e \
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},;' \
172 opal_defs.mak
173
174 install opal_{inc,defs}.mak $RPM_BUILD_ROOT%{_includedir}/opal
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post   -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
181
182 %files
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
210 %endif
211
212 %files devel
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/*.so
215 %{_includedir}/opal
216 %{_pkgconfigdir}/opal.pc
217
218 %files static
219 %defattr(644,root,root,755)
220 %{_libdir}/*.a
This page took 0.063918 seconds and 3 git commands to generate.