]>
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 AM |
10 | Name: criterion |
11 | Version: 2.3.3 | |
286f2900 | 12 | Release: 5 |
87c05200 AM |
13 | License: LGPL v2.1+ |
14 | Group: Libraries | |
6e470621 | 15 | #Source0Download: https://github.com/Snaipe/Criterion/releases |
87c05200 AM |
16 | Source0: https://github.com/Snaipe/Criterion/releases/download/v%{version}/%{name}-v%{version}.tar.bz2 |
17 | # Source0-md5: 0305dbb5e00f04fd65b22e9ad82ba952 | |
6e470621 | 18 | Patch0: %{name}-libdir.patch |
286f2900 JR |
19 | Patch1: x32.patch |
20 | Patch2: no-cram.patch | |
87c05200 AM |
21 | URL: https://github.com/Snaipe/Criterion |
22 | BuildRequires: cmake >= 2.8.0 | |
6e470621 JB |
23 | BuildRequires: dyncall >= 1.0 |
24 | BuildRequires: nanomsg-devel >= 1.0.0 | |
25 | BuildRequires: rpmbuild(macros) >= 1.605 | |
87c05200 AM |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | A dead-simple, yet extensible, C and C++ unit testing framework. | |
30 | ||
6e470621 JB |
31 | %description -l pl.UTF-8 |
32 | Bardzo prosty, ale rozszerzalny szkielet testów jednostkowych dla C i | |
33 | C++. | |
34 | ||
87c05200 AM |
35 | %package devel |
36 | Summary: Header files for criterion library | |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki criterion | |
38 | Group: Development/Libraries | |
39 | Requires: %{name} = %{version}-%{release} | |
40 | Requires: libstdc++-devel | |
41 | ||
42 | %description devel | |
43 | Header files for criterion library. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Pliki nagłówkowe biblioteki criterion. | |
47 | ||
48 | %prep | |
49 | %setup -q -n %{name}-v%{version} | |
6e470621 | 50 | %patch0 -p1 |
286f2900 JR |
51 | %patch1 -p1 |
52 | %patch2 -p1 | |
87c05200 AM |
53 | |
54 | %build | |
55 | install -d build | |
56 | cd build | |
286f2900 JR |
57 | %cmake .. \ |
58 | %{cmake_on_off tests CTESTS} | |
59 | ||
87c05200 AM |
60 | %{__make} |
61 | ||
286f2900 JR |
62 | %{?with_tests:%{__make} criterion_tests test} |
63 | ||
87c05200 AM |
64 | %install |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %{__make} -C build install \ | |
68 | DESTDIR=$RPM_BUILD_ROOT | |
69 | ||
87c05200 AM |
70 | %find_lang Criterion |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post -p /sbin/ldconfig | |
76 | %postun -p /sbin/ldconfig | |
77 | ||
78 | ||
79 | %files -f Criterion.lang | |
80 | %defattr(644,root,root,755) | |
81 | %doc ChangeLog doc/*.txt | |
82 | %attr(755,root,root) %{_libdir}/libcriterion.so.*.*.* | |
83 | %attr(755,root,root) %ghost %{_libdir}/libcriterion.so.3 | |
84 | ||
85 | %files devel | |
86 | %defattr(644,root,root,755) | |
87 | %attr(755,root,root) %{_libdir}/libcriterion.so | |
88 | %{_includedir}/criterion | |
6e470621 | 89 | %{_pkgconfigdir}/criterion.pc |