]>
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 | ||
31 | %description | |
32 | A dead-simple, yet extensible, C and C++ unit testing framework. | |
33 | ||
6e470621 JB |
34 | %description -l pl.UTF-8 |
35 | Bardzo prosty, ale rozszerzalny szkielet testów jednostkowych dla C i | |
36 | C++. | |
37 | ||
87c05200 AM |
38 | %package devel |
39 | Summary: Header files for criterion library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki criterion | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | Requires: libstdc++-devel | |
44 | ||
45 | %description devel | |
46 | Header files for criterion library. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki criterion. | |
50 | ||
51 | %prep | |
2371444b | 52 | %setup -q |
6e470621 | 53 | %patch0 -p1 |
87c05200 AM |
54 | |
55 | %build | |
2371444b JP |
56 | %meson build \ |
57 | -Dtests=%{__true_false tests} | |
87c05200 | 58 | |
2371444b JP |
59 | %ninja_build -C build |
60 | %{?with_tests:%ninja_test -C build} | |
286f2900 | 61 | |
87c05200 AM |
62 | %install |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
2371444b | 65 | %ninja_install -C build |
87c05200 | 66 | |
2371444b | 67 | %find_lang criterion |
87c05200 AM |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post -p /sbin/ldconfig | |
73 | %postun -p /sbin/ldconfig | |
74 | ||
2371444b | 75 | %files -f criterion.lang |
87c05200 AM |
76 | %defattr(644,root,root,755) |
77 | %doc ChangeLog doc/*.txt | |
78 | %attr(755,root,root) %{_libdir}/libcriterion.so.*.*.* | |
79 | %attr(755,root,root) %ghost %{_libdir}/libcriterion.so.3 | |
80 | ||
81 | %files devel | |
82 | %defattr(644,root,root,755) | |
83 | %attr(755,root,root) %{_libdir}/libcriterion.so | |
84 | %{_includedir}/criterion | |
6e470621 | 85 | %{_pkgconfigdir}/criterion.pc |