]>
Commit | Line | Data |
---|---|---|
ff5ec0a1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | # | |
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 | |
7 | Name: bzrtp | |
af1193ec | 8 | Version: 5.3.26 |
04364f58 | 9 | Release: 1 |
1e49e9a9 | 10 | License: GPL v3+ |
ff5ec0a1 | 11 | Group: Libraries |
1e49e9a9 JB |
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 | |
af1193ec JB |
14 | # Source0-md5: 22a3fd39362fce8ebf595a581bd633b6 |
15 | Patch0: %{name}-resetBzrtpContext.patch | |
ff5ec0a1 | 16 | URL: http://www.linphone.org/ |
af1193ec JB |
17 | BuildRequires: bctoolbox-devel >= 5.3.0 |
18 | BuildRequires: cmake >= 3.22 | |
19 | BuildRequires: libstdc++-devel >= 6:4.7 | |
ff5ec0a1 | 20 | BuildRequires: pkgconfig |
1e49e9a9 | 21 | BuildRequires: rpmbuild(macros) >= 1.748 |
867d29df | 22 | BuildRequires: sqlite3-devel >= 3.6.0 |
af1193ec | 23 | Requires: bctoolbox >= 5.3.0 |
867d29df | 24 | Requires: sqlite3 >= 3.6.0 |
ff5ec0a1 JB |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
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. | |
31 | ||
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. | |
36 | ||
37 | %package devel | |
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} | |
af1193ec | 42 | Requires: bctoolbox-devel >= 5.3.0 |
ff5ec0a1 JB |
43 | |
44 | %description devel | |
45 | Header file for bzrtp library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Plik nagłówkowy biblioteki bzrtp. | |
49 | ||
50 | %package static | |
51 | Summary: Static bzrtp library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka bzrtp | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static bzrtp library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka bzrtp. | |
61 | ||
62 | %prep | |
63 | %setup -q | |
0232972c | 64 | %patch0 -p1 |
ff5ec0a1 JB |
65 | |
66 | %build | |
af1193ec JB |
67 | %if %{with static_libs} |
68 | %cmake -B builddir-static \ | |
69 | -DBUILD_SHARED_LIBS=OFF | |
70 | ||
71 | %{__make} -C builddir-static | |
72 | %endif | |
ff5ec0a1 | 73 | |
af1193ec JB |
74 | %cmake -B builddir |
75 | ||
76 | %{__make} -C builddir | |
ff5ec0a1 JB |
77 | |
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
af1193ec JB |
81 | %if %{with static_libs} |
82 | %{__make} -C builddir-static install \ | |
ff5ec0a1 | 83 | DESTDIR=$RPM_BUILD_ROOT |
af1193ec | 84 | %endif |
ff5ec0a1 | 85 | |
af1193ec JB |
86 | %{__make} -C builddir install \ |
87 | DESTDIR=$RPM_BUILD_ROOT | |
0232972c JB |
88 | |
89 | # missing from cmake | |
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 | |
ff5ec0a1 JB |
97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %post -p /sbin/ldconfig | |
102 | %postun -p /sbin/ldconfig | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
1e49e9a9 | 106 | %doc CHANGELOG.md README.md |
0232972c | 107 | %attr(755,root,root) %{_libdir}/libbzrtp.so.0 |
ff5ec0a1 JB |
108 | |
109 | %files devel | |
110 | %defattr(644,root,root,755) | |
111 | %attr(755,root,root) %{_libdir}/libbzrtp.so | |
112 | %{_includedir}/bzrtp | |
113 | %{_pkgconfigdir}/libbzrtp.pc | |
af1193ec JB |
114 | %dir %{_datadir}/BZRTP |
115 | %{_datadir}/BZRTP/cmake | |
ff5ec0a1 JB |
116 | |
117 | %if %{with static_libs} | |
118 | %files static | |
119 | %defattr(644,root,root,755) | |
120 | %{_libdir}/libbzrtp.a | |
121 | %endif |