]>
Commit | Line | Data |
---|---|---|
6e470621 JB |
1 | # TODO: |
2 | # - system boxfort (when released): https://github.com/diacritic/BoxFort | |
3 | # - system libcsptr (when some post-2017 release made): https://github.com/Snaipe/libcsptr | |
286f2900 JR |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without tests # build without tests | |
7 | # | |
87c05200 | 8 | Summary: A cross-platform C and C++ unit testing framework for the 21th century |
6e470621 | 9 | Summary(pl.UTF-8): Wieloplatformowy szkielet do testów jednostkowych dla C i C++ w XXI wieku |
87c05200 | 10 | Name: criterion |
2371444b JP |
11 | Version: 2.4.1 |
12 | Release: 1 | |
87c05200 AM |
13 | License: LGPL v2.1+ |
14 | Group: Libraries | |
6e470621 | 15 | #Source0Download: https://github.com/Snaipe/Criterion/releases |
2371444b JP |
16 | Source0: https://github.com/Snaipe/Criterion/releases/download/v%{version}/%{name}-%{version}.tar.xz |
17 | # Source0-md5: 93e91812837a68524d76339409ed2008 | |
18 | Patch0: x32.patch | |
87c05200 | 19 | URL: https://github.com/Snaipe/Criterion |
6e470621 | 20 | BuildRequires: dyncall >= 1.0 |
2371444b JP |
21 | BuildRequires: libffi-devel |
22 | BuildRequires: libgit2-devel | |
23 | BuildRequires: meson >= 0.51.0 | |
6e470621 | 24 | BuildRequires: nanomsg-devel >= 1.0.0 |
2371444b JP |
25 | BuildRequires: ninja |
26 | BuildRequires: rpmbuild(macros) >= 1.736 | |
27 | BuildRequires: tar >= 1:1.22 | |
28 | BuildRequires: xz | |
87c05200 AM |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
2371444b JP |
31 | %define filterout_c -mbranch-protection=standard |
32 | ||
87c05200 AM |
33 | %description |
34 | A dead-simple, yet extensible, C and C++ unit testing framework. | |
35 | ||
6e470621 JB |
36 | %description -l pl.UTF-8 |
37 | Bardzo prosty, ale rozszerzalny szkielet testów jednostkowych dla C i | |
38 | C++. | |
39 | ||
87c05200 AM |
40 | %package devel |
41 | Summary: Header files for criterion library | |
42 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki criterion | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | Requires: libstdc++-devel | |
46 | ||
47 | %description devel | |
48 | Header files for criterion library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki criterion. | |
52 | ||
53 | %prep | |
2371444b | 54 | %setup -q |
6e470621 | 55 | %patch0 -p1 |
87c05200 AM |
56 | |
57 | %build | |
2371444b JP |
58 | %meson build \ |
59 | -Dtests=%{__true_false tests} | |
87c05200 | 60 | |
2371444b JP |
61 | %ninja_build -C build |
62 | %{?with_tests:%ninja_test -C build} | |
286f2900 | 63 | |
87c05200 AM |
64 | %install |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
2371444b | 67 | %ninja_install -C build |
87c05200 | 68 | |
2371444b | 69 | %find_lang criterion |
87c05200 AM |
70 | |
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %post -p /sbin/ldconfig | |
75 | %postun -p /sbin/ldconfig | |
76 | ||
77 | ||
2371444b | 78 | %files -f criterion.lang |
87c05200 AM |
79 | %defattr(644,root,root,755) |
80 | %doc ChangeLog doc/*.txt | |
81 | %attr(755,root,root) %{_libdir}/libcriterion.so.*.*.* | |
82 | %attr(755,root,root) %ghost %{_libdir}/libcriterion.so.3 | |
83 | ||
84 | %files devel | |
85 | %defattr(644,root,root,755) | |
86 | %attr(755,root,root) %{_libdir}/libcriterion.so | |
87 | %{_includedir}/criterion | |
6e470621 | 88 | %{_pkgconfigdir}/criterion.pc |