1 # TODO: tunnel? (BR: pkgconfig(tunnel) or TunnelConfig.cmake)
4 %bcond_without dnssd # MDNS/DNSSD support
5 %bcond_without static_libs # static library
6 %bcond_with tests # enable tests
8 Summary: SIP (RFC3261) object-oriented implementation in C
9 Summary(pl.UTF-8): Implementacja SIP (RFC3261) w C
15 #Source0Download: https://gitlab.linphone.org/BC/public/belle-sip/-/tags
16 Source0: https://gitlab.linphone.org/BC/public/belle-sip/-/archive/%{version}/%{name}-%{version}.tar.bz2
17 # Source0-md5: b4bcdbcb0e641cef2e1e5ecec889c9b5
18 Patch0: antlr_jar.patch
19 Patch1: %{name}-pc.patch
20 Patch2: %{name}-mbedtlsv3.patch
21 URL: http://www.linphone.org/technical-corner/belle-sip
22 %{?with_tests:BuildRequires: CUnit >= 2.0}
23 %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel}
24 BuildRequires: bctoolbox-devel >= 0.5.0
25 BuildRequires: cmake >= 3.1
26 BuildRequires: java-antlr3 >= 3.2
28 BuildRequires: libantlr3c-devel >= 3.4
29 BuildRequires: libstdc++-devel
30 BuildRequires: pkgconfig
31 BuildRequires: rpmbuild(macros) >= 1.605
32 BuildRequires: zlib-devel >= 1.2.3
33 Requires: bctoolbox >= 0.5.0
34 Requires: libantlr3c >= 3.4
35 Requires: zlib >= 1.2.3
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Belle-sip is a SIP (RFC3261) implementation written in C, with an
42 %description -l pl.UTF-8
43 Belle-sip to implementacja SIP (RFC3261) napisana w C z API
44 zorientowanym obiektowo.
47 Summary: Header files for %{name} library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
51 Requires: bctoolbox-devel >= 0.5.0
52 Requires: libantlr3c-devel >= 3.4
55 Header files for %{name} library.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki %{name}.
61 Summary: Static %{name} library
62 Summary(pl.UTF-8): Statyczna biblioteka %{name}
63 Group: Development/Libraries
64 Requires: %{name}-devel = %{version}-%{release}
67 Static %{name} library.
69 %description static -l pl.UTF-8
70 Statyczna biblioteka %{name}.
82 %{?with_dnssd:-DENABLE_MDNS=ON} \
83 %{!?with_static_libs:-DENABLE_STATIC=OFF} \
84 %{!?with_tests:-DENABLE_TESTS=OFF}
88 %{?with_tests:%{__make} test}
91 rm -rf $RPM_BUILD_ROOT
93 %{__make} -C builddir install \
94 DESTDIR=$RPM_BUILD_ROOT
96 # disable completeness check incompatible with split packaging
97 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/BelleSIP/BelleSIPTargets.cmake
100 rm -rf $RPM_BUILD_ROOT
102 %post -p /sbin/ldconfig
103 %postun -p /sbin/ldconfig
106 %defattr(644,root,root,755)
107 %doc AUTHORS.md CHANGELOG.md README.md
108 %attr(755,root,root) %{_libdir}/libbellesip.so.1
109 %{_datadir}/belr/grammars/sdp_grammar
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_libdir}/libbellesip.so
114 %{_includedir}/belle-sip
115 %{_pkgconfigdir}/belle-sip.pc
116 %{_libdir}/cmake/BelleSIP
118 %if %{with static_libs}
120 %defattr(644,root,root,755)
121 %{_libdir}/libbellesip.a