3 %bcond_without static_libs # static library
5 Summary: Open source implementation of ZRTP keys exchange protocol
6 Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP
12 #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags
13 Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5: 22a3fd39362fce8ebf595a581bd633b6
15 Patch0: %{name}-resetBzrtpContext.patch
16 URL: http://www.linphone.org/
17 BuildRequires: bctoolbox-devel >= 5.3.0
18 BuildRequires: cmake >= 3.22
19 BuildRequires: libstdc++-devel >= 6:4.7
20 BuildRequires: pkgconfig
21 BuildRequires: rpmbuild(macros) >= 1.748
22 BuildRequires: sqlite3-devel >= 3.6.0
23 Requires: bctoolbox >= 5.3.0
24 Requires: sqlite3 >= 3.6.0
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 bzrtp is an opensource implementation of ZRTP keys exchange protocol.
29 The library written in C 89 is fully portable and can be executed on
30 many platforms including both ARM processor and x86.
32 %description -l pl.UTF-8
33 bzrtp to mająca otwarte źródła implementacja protokołu wymiany kluczy
34 ZRTP. Napisana w C 89 biblioteka jest w pełni przenośna i może być
35 wykonywana na wielu platformach, w tym ARM oraz x86.
38 Summary: Header file for bzrtp library
39 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bzrtp
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
42 Requires: bctoolbox-devel >= 5.3.0
45 Header file for bzrtp library.
47 %description devel -l pl.UTF-8
48 Plik nagłówkowy biblioteki bzrtp.
51 Summary: Static bzrtp library
52 Summary(pl.UTF-8): Statyczna biblioteka bzrtp
53 Group: Development/Libraries
54 Requires: %{name}-devel = %{version}-%{release}
59 %description static -l pl.UTF-8
60 Statyczna biblioteka bzrtp.
67 %if %{with static_libs}
68 %cmake -B builddir-static \
69 -DBUILD_SHARED_LIBS=OFF
71 %{__make} -C builddir-static
79 rm -rf $RPM_BUILD_ROOT
81 %if %{with static_libs}
82 %{__make} -C builddir-static install \
83 DESTDIR=$RPM_BUILD_ROOT
86 %{__make} -C builddir install \
87 DESTDIR=$RPM_BUILD_ROOT
90 test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
91 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
92 %{__sed} -e 's,@prefix@,%{_prefix},' \
93 -e 's,@exec_prefix@,%{_exec_prefix},' \
94 -e 's,@includedir@,%{_includedir},' \
95 -e 's,@PACKAGE_VERSION@,%{version},' \
96 -e 's,@libdir@,%{_libdir},' libbzrtp.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
99 rm -rf $RPM_BUILD_ROOT
101 %post -p /sbin/ldconfig
102 %postun -p /sbin/ldconfig
105 %defattr(644,root,root,755)
106 %doc CHANGELOG.md README.md
107 %attr(755,root,root) %{_libdir}/libbzrtp.so.0
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_libdir}/libbzrtp.so
113 %{_pkgconfigdir}/libbzrtp.pc
114 %dir %{_datadir}/BZRTP
115 %{_datadir}/BZRTP/cmake
117 %if %{with static_libs}
119 %defattr(644,root,root,755)
120 %{_libdir}/libbzrtp.a