]>
Commit | Line | Data |
---|---|---|
bab9183b JB |
1 | # NOTE: due to its nature, base package is development tool, so there is no separate -devel |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_with examples # build examples (seems broken) | |
5 | # | |
ffbabb0d | 6 | Summary: Automated testing framework for C |
0e2f8d9f | 7 | Summary(pl.UTF-8): Szkielet automatycznych testów dla C |
5449fbd5 | 8 | Name: CUnit |
bab9183b | 9 | Version: 2.1 |
2280744d | 10 | Release: 4 |
bab9183b | 11 | License: LGPL v2+ |
5449fbd5 | 12 | Group: Development/Tools |
78478389 JB |
13 | Source0: http://downloads.sourceforge.net/cunit/%{name}-%{version}-3.tar.bz2 |
14 | # Source0-md5: b5f1a9f6093869c070c6e4a9450cc10c | |
5449fbd5 ER |
15 | Patch0: %{name}-curses.patch |
16 | Patch1: %{name}-libs.patch | |
17 | Patch2: %{name}-FHS.patch | |
2280744d | 18 | Patch3: format.patch |
5449fbd5 ER |
19 | URL: http://cunit.sourceforge.net/ |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
bab9183b | 22 | BuildRequires: libtool |
5449fbd5 | 23 | BuildRequires: ncurses-devel |
bab9183b | 24 | Requires: %{name}-libs = %{version}-%{release} |
5449fbd5 ER |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | CUnit is a lightweight system for writing, administering, and running | |
29 | unit tests in C. It provides C programmers a basic testing | |
30 | functionality with a flexible variety of user interfaces. | |
31 | ||
32 | CUnit is built as a static library which is linked with the user's | |
33 | testing code. It uses a simple framework for building test structures, | |
34 | and provides a rich set of assertions for testing common data types. | |
35 | In addition, several different interfaces are provided for running | |
36 | tests and reporting results. | |
37 | ||
dce1a864 | 38 | %description -l pl.UTF-8 |
ffbabb0d | 39 | CUnit to lekki system do pisania, administrowania i uruchamiania |
dce1a864 JR |
40 | testów jednostkowych w C. Udostępnia programistom C podstawową |
41 | funkcjonalność testującą z elastycznym wyborem interfejsów | |
42 | użytkownika. | |
ffbabb0d | 43 | |
dce1a864 JR |
44 | CUnit jest budowany jako biblioteka statyczna, którą linkuje się z |
45 | kodem testowym użytkownika. Używa prostego szkieletu do tworzenia | |
46 | struktur testowych i udostępnia bogaty zbiór zapewnień (assertions) | |
47 | do testowania popularnych typów danych. | |
ffbabb0d | 48 | |
bab9183b JB |
49 | %package libs |
50 | Summary: Shared CUnit library | |
51 | Summary(pl.UTF-8): Biblioteka współdzielona CUnit | |
52 | Group: Libraries | |
53 | ||
54 | %description libs | |
55 | Shared CUnit library. | |
56 | ||
57 | %description libs -l pl.UTF-8 | |
58 | Biblioteka współdzielona CUnit. | |
59 | ||
60 | %package static | |
61 | Summary: Static CUnit library | |
62 | Summary(pl.UTF-8): Biblioteka statyczna CUnit | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static CUnit library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Biblioteka statyczna CUnit. | |
71 | ||
72 | %package examples | |
73 | Summary: CUnit examples | |
74 | Summary(pl.UTF-8): Przykłady do CUnita | |
75 | Group: Development/Tools | |
76 | Requires: %{name} = %{version}-%{release} | |
77 | ||
78 | %description examples | |
79 | CUnit examples. | |
80 | ||
81 | %description examples -l pl.UTF-8 | |
82 | Przykłady do CUnita. | |
83 | ||
5449fbd5 | 84 | %prep |
78478389 | 85 | %setup -q -n %{name}-%{version}-3 |
5449fbd5 ER |
86 | %patch0 -p1 |
87 | %patch1 -p1 | |
88 | %patch2 -p1 | |
2280744d | 89 | %patch3 -p1 |
5449fbd5 ER |
90 | |
91 | %build | |
bab9183b | 92 | %{__libtoolize} |
5449fbd5 ER |
93 | %{__aclocal} |
94 | %{__autoconf} | |
95 | %{__autoheader} | |
96 | %{__automake} | |
97 | %configure \ | |
bab9183b | 98 | --enable-curses \ |
5449fbd5 | 99 | %{?debug:--enable-debug} \ |
bab9183b | 100 | %{?with_examples:--enable-examples --enable-test} |
5449fbd5 ER |
101 | %{__make} |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
bab9183b JB |
109 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcunit.la |
110 | ||
111 | rm -rf docs | |
112 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/CUnit docs | |
5449fbd5 ER |
113 | |
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
bab9183b JB |
117 | %post libs -p /sbin/ldconfig |
118 | %postun libs -p /sbin/ldconfig | |
119 | ||
5449fbd5 ER |
120 | %files |
121 | %defattr(644,root,root,755) | |
bab9183b JB |
122 | %doc AUTHORS ChangeLog NEWS README TODO docs |
123 | %attr(755,root,root) %{_libdir}/libcunit.so | |
5449fbd5 | 124 | %{_includedir}/CUnit |
5449fbd5 | 125 | %{_datadir}/CUnit |
bab9183b JB |
126 | %{_pkgconfigdir}/cunit.pc |
127 | %{_mandir}/man3/CUnit.3* | |
128 | ||
129 | %files libs | |
130 | %defattr(644,root,root,755) | |
131 | %attr(755,root,root) %{_libdir}/libcunit.so.*.*.* | |
132 | %attr(755,root,root) %ghost %{_libdir}/libcunit.so.1 | |
133 | ||
134 | %files static | |
135 | %defattr(644,root,root,755) | |
136 | %{_libdir}/libcunit.a | |
5449fbd5 | 137 | |
bab9183b JB |
138 | %if %{with examples} |
139 | %files examples | |
78478389 JB |
140 | %dir %{_libexecdir}/CUnit |
141 | %dir %{_libexecdir}/CUnit/Examples | |
142 | %dir %{_libexecdir}/CUnit/Examples/Automated | |
143 | %attr(755,root,root) %{_libexecdir}/CUnit/Examples/Automated/AutomatedTest | |
144 | %{_libexecdir}/CUnit/Examples/Automated/README | |
145 | %dir %{_libexecdir}/CUnit/Examples/Basic | |
146 | %attr(755,root,root) %{_libexecdir}/CUnit/Examples/Basic/BasicTest | |
147 | %{_libexecdir}/CUnit/Examples/Basic/README | |
148 | %dir %{_libexecdir}/CUnit/Examples/Console | |
149 | %attr(755,root,root) %{_libexecdir}/CUnit/Examples/Console/ConsoleTest | |
150 | %{_libexecdir}/CUnit/Examples/Console/README | |
151 | %dir %{_libexecdir}/CUnit/Examples/Curses | |
152 | %attr(755,root,root) %{_libexecdir}/CUnit/Examples/Curses/CursesTest | |
153 | %{_libexecdir}/CUnit/Examples/Curses/README | |
154 | %dir %{_libexecdir}/CUnit/Test | |
155 | %attr(755,root,root) %{_libexecdir}/CUnit/Test/test_cunit | |
bab9183b | 156 | %endif |