1 # TODO: tunnel >= 0.7.0? (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: 6282d86a629f9d5aede25534bd9bcf87
18 Patch0: antlr_jar.patch
19 Patch1: %{name}-pc.patch
20 URL: https://www.linphone.org/
21 %{?with_tests:BuildRequires: CUnit >= 2.0}
22 %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel}
23 BuildRequires: bctoolbox-devel >= 5.3.0
24 BuildRequires: belr-devel >= 5.3.0
25 BuildRequires: cmake >= 3.22
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 >= 5.3.0
34 Requires: belr >= 5.3.0
35 Requires: libantlr3c >= 3.4
36 Requires: zlib >= 1.2.3
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Belle-sip is a SIP (RFC3261) implementation written in C, with an
43 %description -l pl.UTF-8
44 Belle-sip to implementacja SIP (RFC3261) napisana w C z API
45 zorientowanym obiektowo.
48 Summary: Header files for %{name} library
49 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
52 Requires: bctoolbox-devel >= 5.3.0
53 Requires: belr-devel >= 5.3.0
54 Requires: libantlr3c-devel >= 3.4
57 Header files for %{name} library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki %{name}.
63 Summary: Static %{name} library
64 Summary(pl.UTF-8): Statyczna biblioteka %{name}
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
69 Static %{name} library.
71 %description static -l pl.UTF-8
72 Statyczna biblioteka %{name}.
80 %if %{with static_libs}
81 %cmake -B builddir-static \
82 -DBUILD_SHARED_LIBS=OFF \
83 %{?with_dnssd:-DENABLE_MDNS=ON} \
84 -DENABLE_UNIT_TESTS=OFF
86 %{__make} -C builddir-static
90 %{?with_dnssd:-DENABLE_MDNS=ON} \
91 %{!?with_static_libs:-DENABLE_STATIC=OFF} \
92 %{!?with_tests:-DENABLE_UNIT_TESTS=OFF}
97 %{__make} -C builddir test
101 rm -rf $RPM_BUILD_ROOT
103 %if %{with static_libs}
104 %{__make} -C builddir-static install \
105 DESTDIR=$RPM_BUILD_ROOT
108 %{__make} -C builddir install \
109 DESTDIR=$RPM_BUILD_ROOT
112 rm -rf $RPM_BUILD_ROOT
114 %post -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
118 %defattr(644,root,root,755)
119 %doc AUTHORS.md CHANGELOG.md README.md
120 %attr(755,root,root) %{_libdir}/libbelle-sip.so.1
121 %{_datadir}/belr/grammars/sdp_grammar
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libbelle-sip.so
126 %{_includedir}/belle-sip
127 %{_pkgconfigdir}/belle-sip.pc
128 %{_libdir}/cmake/BelleSIP
130 %if %{with static_libs}
132 %defattr(644,root,root,755)
133 %{_libdir}/libbelle-sip.a