]>
Commit | Line | Data |
---|---|---|
581c6399 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static libraries | |
4 | ||
82032e80 | 5 | Summary: Utility library for software from Belledonne Communications |
581c6399 | 6 | Summary(pl.UTF-8): Biblioteka narzędziowa dla oprogramowania firmy Belledonne Communications |
82032e80 | 7 | Name: bctoolbox |
232d9ea8 | 8 | Version: 4.4.0 |
220521e9 | 9 | Release: 2 |
232d9ea8 | 10 | License: GPL v3+ |
82032e80 | 11 | Group: Libraries |
232d9ea8 JB |
12 | #Source0Download: https://gitlab.linphone.org/BC/public/bctoolbox/tags |
13 | Source0: https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/%{version}/%{name}-%{version}.tar.bz2 | |
14 | # Source0-md5: b1239d1aebca6acdf5662d5970c159ab | |
82032e80 | 15 | URL: https://linphone.org/ |
232d9ea8 JB |
16 | # with junit xml support |
17 | BuildRequires: bcunit-devel >= 3.0.2-3.20200822 | |
581c6399 | 18 | BuildRequires: cmake >= 2.8.12 |
232d9ea8 | 19 | BuildRequires: libdecaf-devel |
581c6399 | 20 | BuildRequires: libstdc++-devel >= 6:4.7 |
82032e80 | 21 | BuildRequires: mbedtls-devel |
581c6399 | 22 | BuildRequires: sed >= 4.0 |
82032e80 AM |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | Utilities library used by Belledonne Communications softwares like | |
27 | belle-sip, mediastreamer2 and linphone. | |
28 | ||
581c6399 JB |
29 | %description -l pl.UTF-8 |
30 | Biblioteka narzędziowa używana w oprogramowaniu firmy Belledonne | |
31 | Communications, takim jak belle-sip, mediastreamer2 czy linphone. | |
32 | ||
82032e80 | 33 | %package devel |
581c6399 JB |
34 | Summary: Header files for bctoolbox libraries |
35 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek bctoolbox | |
82032e80 | 36 | Group: Development/Libraries |
581c6399 | 37 | Requires: %{name} = %{version}-%{release} |
232d9ea8 JB |
38 | Requires: libdecaf-devel |
39 | Requires: mbedtls-devel | |
82032e80 AM |
40 | |
41 | %description devel | |
581c6399 JB |
42 | Header files for bctoolbox libraries. |
43 | ||
44 | %description devel -l pl.UTF-8 | |
45 | Pliki nagłówkowe bibliotek bctoolbox. | |
46 | ||
47 | %package static | |
48 | Summary: Static bctoolbox libraries | |
49 | Summary(pl.UTF-8): Statyczne biblioteki bctoolbox | |
50 | Group: Development/Libraries | |
51 | Requires: %{name}-devel = %{version}-%{release} | |
52 | ||
53 | %description static | |
54 | Static bctoolbox libraries. | |
55 | ||
56 | %description static -l pl.UTF-8 | |
57 | Statyczne biblioteki bctoolbox. | |
82032e80 AM |
58 | |
59 | %prep | |
60 | %setup -q | |
61 | ||
62 | %build | |
63 | install -d build | |
64 | cd build | |
581c6399 JB |
65 | %cmake .. \ |
66 | %{!?with_static_libs:-DENABLE_STATIC=OFF} | |
82032e80 AM |
67 | |
68 | %{__make} | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %{__make} -C build install \ | |
74 | DESTDIR=$RPM_BUILD_ROOT | |
75 | ||
581c6399 | 76 | # disable completeness check incompatible with split packaging |
232d9ea8 | 77 | %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bctoolbox/cmake/bctoolboxTargets.cmake |
581c6399 | 78 | |
82032e80 AM |
79 | %clean |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
581c6399 JB |
82 | %post -p /sbin/ldconfig |
83 | %postun -p /sbin/ldconfig | |
82032e80 AM |
84 | |
85 | %files | |
86 | %defattr(644,root,root,755) | |
232d9ea8 | 87 | %doc CHANGELOG.md README.md |
581c6399 JB |
88 | %attr(755,root,root) %{_libdir}/libbctoolbox.so.1 |
89 | %attr(755,root,root) %{_libdir}/libbctoolbox-tester.so.1 | |
82032e80 AM |
90 | |
91 | %files devel | |
92 | %defattr(644,root,root,755) | |
93 | %attr(755,root,root) %{_libdir}/libbctoolbox.so | |
94 | %attr(755,root,root) %{_libdir}/libbctoolbox-tester.so | |
95 | %{_includedir}/bctoolbox | |
96 | %{_pkgconfigdir}/bctoolbox.pc | |
97 | %{_pkgconfigdir}/bctoolbox-tester.pc | |
581c6399 JB |
98 | %dir %{_datadir}/bctoolbox |
99 | %{_datadir}/bctoolbox/cmake | |
100 | ||
101 | %if %{with static_libs} | |
102 | %files static | |
103 | %defattr(644,root,root,755) | |
104 | %{_libdir}/libbctoolbox.a | |
105 | %{_libdir}/libbctoolbox-tester.a | |
106 | %endif |