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