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: 67af666eeef27ec7ff6717eb7d0f02c7
15 Patch0: %{name}-static.patch
16 URL: http://www.linphone.org/
18 BuildRequires: bctoolbox-devel >= 4.4.0
19 BuildRequires: cmake >= 3.1
20 BuildRequires: libxml2-devel >= 2.0
21 BuildRequires: pkgconfig
22 BuildRequires: rpmbuild(macros) >= 1.748
23 BuildRequires: sqlite3-devel >= 3.6.0
24 Requires: bctoolbox >= 4.4.0
25 Requires: sqlite3 >= 3.6.0
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 bzrtp is an opensource implementation of ZRTP keys exchange protocol.
30 The library written in C 89 is fully portable and can be executed on
31 many platforms including both ARM processor and x86.
33 %description -l pl.UTF-8
34 bzrtp to mająca otwarte źródła implementacja protokołu wymiany kluczy
35 ZRTP. Napisana w C 89 biblioteka jest w pełni przenośna i może być
36 wykonywana na wielu platformach, w tym ARM oraz x86.
39 Summary: Header file for bzrtp library
40 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bzrtp
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
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.
70 %{!?with_static_libs:-DENABLE_STATIC=OFF}
75 rm -rf $RPM_BUILD_ROOT
77 %{__make} -C build install \
78 DESTDIR=$RPM_BUILD_ROOT
80 # disable completeness check incompatible with split packaging
81 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bzrtp/cmake/bzrtpTargets.cmake
84 test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
85 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
86 %{__sed} -e 's,@prefix@,%{_prefix},' \
87 -e 's,@exec_prefix@,%{_exec_prefix},' \
88 -e 's,@includedir@,%{_includedir},' \
89 -e 's,@PACKAGE_VERSION@,%{version},' \
90 -e 's,@libdir@,%{_libdir},' libbzrtp.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
93 rm -rf $RPM_BUILD_ROOT
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
99 %defattr(644,root,root,755)
100 %doc CHANGELOG.md README.md
101 %attr(755,root,root) %{_libdir}/libbzrtp.so.0
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/libbzrtp.so
107 %{_pkgconfigdir}/libbzrtp.pc
108 %dir %{_datadir}/bzrtp
109 %{_datadir}/bzrtp/cmake
111 %if %{with static_libs}
113 %defattr(644,root,root,755)
114 %{_libdir}/libbzrtp.a