]>
Commit | Line | Data |
---|---|---|
dc573ce3 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without subunit # support for subunit test protocol | |
4 | ||
0044121d | 5 | Summary: Check - unit testing framework for C |
39525af9 | 6 | Summary(pl.UTF-8): Check - szkielet testów jednostkowych dla C |
0044121d | 7 | Name: check |
dc573ce3 JB |
8 | Version: 0.12.0 |
9 | Release: 1 | |
0044121d | 10 | License: LGPL v2.1+ |
28297c4f | 11 | Group: Libraries |
dc573ce3 JB |
12 | #Source0Download: https://github.com/libcheck/check/releases |
13 | Source0: https://github.com/libcheck/check/releases/download/%{version}/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 31b17c6075820a434119592941186f70 | |
5a1f9cd0 | 15 | Patch0: %{name}-info.patch |
dc573ce3 | 16 | URL: https://libcheck.github.io/check/ |
8c92c757 | 17 | # aclocal required for %{_aclocaldir} |
dc573ce3 JB |
18 | BuildRequires: automake >= 1:1.11.2 |
19 | BuildRequires: libtool >= 2:2 | |
20 | BuildRequires: pkgconfig | |
21 | %{?with_subunit:BuildRequires: subunit-devel} | |
f3f03e56 | 22 | BuildRequires: texinfo >= 4.2 |
0044121d JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
4713b48d | 25 | %undefine __cxx |
26 | ||
0044121d JB |
27 | %description |
28 | Check is a unit test framework for C. It features a simple interface | |
29 | for defining unit tests, putting little in the way of the developer. | |
30 | Tests are run in a separate address space, so Check can catch both | |
31 | assertion failures and code errors that cause segmentation faults or | |
32 | other signals. The output from unit tests can be used within source | |
33 | code editors and IDEs. | |
34 | ||
eda70338 JB |
35 | This package contains only shared library. |
36 | ||
ff212a42 JR |
37 | %description -l pl.UTF-8 |
38 | Check to szkielet testów jednostkowych dla C. Ma prosty interfejs do | |
39 | definiowania testów jednostkowych, nie przeszkadzający zbytnio | |
40 | programiście. Testy są uruchamiane w wydzielonej przestrzeni | |
41 | adresowej, dzięki czemu Check może wyłapać zarówno niepowodzenia | |
28297c4f ER |
42 | zapewnień (assert), jak i błędy w kodzie powodujące naruszenie ochrony |
43 | pamięci lub inne sygnały. Wyjście z testów jednostkowych może być | |
44 | używane z poziomu edytorów kodu źródłowego i IDE. | |
45 | ||
eda70338 JB |
46 | Ten pakiet zawiera tylko bibliotekę współdzieloną. |
47 | ||
28297c4f | 48 | %package devel |
eda70338 JB |
49 | Summary: Headers for developing programs with check library |
50 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów przy użyciu biblioteki checka | |
28297c4f ER |
51 | Group: Development/Libraries |
52 | Requires: %{name} = %{version}-%{release} | |
dc573ce3 | 53 | %{?with_subunit:Requires: subunit-devel} |
28297c4f ER |
54 | |
55 | %description devel | |
eda70338 JB |
56 | Headers for developing programs with check library. |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki nagłówkowe do tworzenia programów przy użyciu biblioteki checka. | |
0044121d | 60 | |
1b5e9f8c JB |
61 | %package static |
62 | Summary: Static check library | |
63 | Summary(pl.UTF-8): Biblioteka statyczna check | |
64 | Group: Development/Libraries | |
28297c4f | 65 | Requires: %{name}-devel = %{version}-%{release} |
1b5e9f8c JB |
66 | |
67 | %description static | |
68 | Static check library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Biblioteka statyczna check. | |
72 | ||
0044121d JB |
73 | %prep |
74 | %setup -q | |
5a1f9cd0 | 75 | %patch0 -p1 |
0044121d JB |
76 | |
77 | %build | |
5a1f9cd0 | 78 | CFLAGS="%{rpmcflags} -fPIC" |
dc573ce3 JB |
79 | %configure \ |
80 | %{!?with_subunit:--disable-subunit} | |
5a1f9cd0 | 81 | %{__make} |
0044121d JB |
82 | |
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %{__make} install \ | |
1bc5c11c SS |
87 | exampledir=%{_examplesdir}/%{name}-%{version} \ |
88 | examplesrcdir=%{_examplesdir}/%{name}-%{version}/src \ | |
89 | exampletestsdir=%{_examplesdir}/%{name}-%{version}/tests \ | |
0044121d JB |
90 | DESTDIR=$RPM_BUILD_ROOT |
91 | ||
b291956b JB |
92 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
93 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcheck.la | |
94 | %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir | |
f3f03e56 | 95 | |
0044121d JB |
96 | %clean |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
a661bf6c ER |
99 | %post -p /sbin/ldconfig |
100 | %postun -p /sbin/ldconfig | |
f3f03e56 | 101 | |
b291956b | 102 | %post devel -p /sbin/postshell |
a661bf6c ER |
103 | -/usr/sbin/fix-info-dir -c %{_infodir} |
104 | ||
b291956b | 105 | %postun devel -p /sbin/postshell |
a661bf6c | 106 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f3f03e56 | 107 | |
0044121d JB |
108 | %files |
109 | %defattr(644,root,root,755) | |
dc573ce3 | 110 | %doc AUTHORS NEWS README THANKS TODO |
78e36e09 | 111 | %attr(755,root,root) %{_libdir}/libcheck.so.*.*.* |
a661bf6c | 112 | %attr(755,root,root) %ghost %{_libdir}/libcheck.so.0 |
28297c4f ER |
113 | |
114 | %files devel | |
115 | %defattr(644,root,root,755) | |
b291956b | 116 | %attr(755,root,root) %{_bindir}/checkmk |
78e36e09 | 117 | %attr(755,root,root) %{_libdir}/libcheck.so |
78e36e09 | 118 | %{_includedir}/check.h |
b291956b | 119 | %{_includedir}/check_stdint.h |
78e36e09 | 120 | %{_aclocaldir}/check.m4 |
f3f03e56 | 121 | %{_pkgconfigdir}/check.pc |
b291956b | 122 | %{_mandir}/man1/checkmk.1* |
f3f03e56 | 123 | %{_infodir}/check.info* |
78e36e09 | 124 | %{_examplesdir}/%{name}-%{version} |
1b5e9f8c JB |
125 | |
126 | %files static | |
127 | %defattr(644,root,root,755) | |
128 | %{_libdir}/libcheck.a |