]>
Commit | Line | Data |
---|---|---|
344c4879 | 1 | # TODO: tunnel >= 0.7.0? (BR: pkgconfig(tunnel) or TunnelConfig.cmake) |
4d971c61 JK |
2 | # |
3 | # Conditional build: | |
e90cc7b8 | 4 | %bcond_without dnssd # MDNS/DNSSD support |
8209bdd7 | 5 | %bcond_without static_libs # static library |
4d971c61 JK |
6 | %bcond_with tests # enable tests |
7 | # | |
8 | Summary: SIP (RFC3261) object-oriented implementation in C | |
9 | Summary(pl.UTF-8): Implementacja SIP (RFC3261) w C | |
10 | Name: belle-sip | |
344c4879 | 11 | Version: 5.3.29 |
cb2eb066 JB |
12 | Release: 1 |
13 | License: GPL v3+ | |
4d971c61 | 14 | Group: Libraries |
e90cc7b8 JB |
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 | |
344c4879 | 17 | # Source0-md5: 6282d86a629f9d5aede25534bd9bcf87 |
4d971c61 | 18 | Patch0: antlr_jar.patch |
e90cc7b8 | 19 | Patch1: %{name}-pc.patch |
344c4879 | 20 | URL: https://www.linphone.org/ |
4d971c61 | 21 | %{?with_tests:BuildRequires: CUnit >= 2.0} |
cb2eb066 | 22 | %{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel} |
344c4879 JB |
23 | BuildRequires: bctoolbox-devel >= 5.3.0 |
24 | BuildRequires: belr-devel >= 5.3.0 | |
25 | BuildRequires: cmake >= 3.22 | |
4d971c61 | 26 | BuildRequires: java-antlr3 >= 3.2 |
5b7dfe73 | 27 | BuildRequires: jre |
cc806804 | 28 | BuildRequires: libantlr3c-devel >= 3.4 |
5b7dfe73 | 29 | BuildRequires: libstdc++-devel |
5b7dfe73 | 30 | BuildRequires: pkgconfig |
e90cc7b8 | 31 | BuildRequires: rpmbuild(macros) >= 1.605 |
8209bdd7 | 32 | BuildRequires: zlib-devel >= 1.2.3 |
344c4879 JB |
33 | Requires: bctoolbox >= 5.3.0 |
34 | Requires: belr >= 5.3.0 | |
8209bdd7 JB |
35 | Requires: libantlr3c >= 3.4 |
36 | Requires: zlib >= 1.2.3 | |
4d971c61 JK |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | Belle-sip is a SIP (RFC3261) implementation written in C, with an | |
5b7dfe73 JB |
41 | object oriented API. |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Belle-sip to implementacja SIP (RFC3261) napisana w C z API | |
45 | zorientowanym obiektowo. | |
4d971c61 JK |
46 | |
47 | %package devel | |
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} | |
344c4879 JB |
52 | Requires: bctoolbox-devel >= 5.3.0 |
53 | Requires: belr-devel >= 5.3.0 | |
8209bdd7 | 54 | Requires: libantlr3c-devel >= 3.4 |
4d971c61 JK |
55 | |
56 | %description devel | |
57 | Header files for %{name} library. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki %{name}. | |
61 | ||
62 | %package static | |
63 | Summary: Static %{name} library | |
64 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description static | |
69 | Static %{name} library. | |
70 | ||
71 | %description static -l pl.UTF-8 | |
72 | Statyczna biblioteka %{name}. | |
73 | ||
74 | %prep | |
e90cc7b8 | 75 | %setup -q |
4d971c61 | 76 | %patch0 -p1 |
754925e1 | 77 | %patch1 -p1 |
4d971c61 JK |
78 | |
79 | %build | |
344c4879 JB |
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 | |
85 | ||
86 | %{__make} -C builddir-static | |
87 | %endif | |
88 | ||
89 | %cmake -B builddir \ | |
e90cc7b8 JB |
90 | %{?with_dnssd:-DENABLE_MDNS=ON} \ |
91 | %{!?with_static_libs:-DENABLE_STATIC=OFF} \ | |
344c4879 | 92 | %{!?with_tests:-DENABLE_UNIT_TESTS=OFF} |
4d971c61 | 93 | |
344c4879 | 94 | %{__make} -C builddir |
4d971c61 | 95 | |
344c4879 JB |
96 | %if %{with tests} |
97 | %{__make} -C builddir test | |
98 | %endif | |
4d971c61 JK |
99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
344c4879 JB |
103 | %if %{with static_libs} |
104 | %{__make} -C builddir-static install \ | |
4d971c61 | 105 | DESTDIR=$RPM_BUILD_ROOT |
344c4879 | 106 | %endif |
4d971c61 | 107 | |
344c4879 JB |
108 | %{__make} -C builddir install \ |
109 | DESTDIR=$RPM_BUILD_ROOT | |
3afde851 | 110 | |
4d971c61 JK |
111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post -p /sbin/ldconfig | |
115 | %postun -p /sbin/ldconfig | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
e90cc7b8 | 119 | %doc AUTHORS.md CHANGELOG.md README.md |
344c4879 | 120 | %attr(755,root,root) %{_libdir}/libbelle-sip.so.1 |
cb2eb066 | 121 | %{_datadir}/belr/grammars/sdp_grammar |
4d971c61 JK |
122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
344c4879 | 125 | %attr(755,root,root) %{_libdir}/libbelle-sip.so |
8209bdd7 JB |
126 | %{_includedir}/belle-sip |
127 | %{_pkgconfigdir}/belle-sip.pc | |
e90cc7b8 | 128 | %{_libdir}/cmake/BelleSIP |
4d971c61 JK |
129 | |
130 | %if %{with static_libs} | |
131 | %files static | |
132 | %defattr(644,root,root,755) | |
344c4879 | 133 | %{_libdir}/libbelle-sip.a |
4d971c61 | 134 | %endif |