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