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