]>
Commit | Line | Data |
---|---|---|
5449fbd5 ER |
1 | Summary: Automated testing framework for 'C' |
2 | Name: CUnit | |
3 | Version: 2.0 | |
4 | Release: 0.5 | |
5 | License: LGPL | |
6 | Group: Development/Tools | |
7 | Source0: http://dl.sourceforge.net/cunit/%{name}-%{version}-2.tar.gz | |
8 | # Source0-md5: d493ba42f06bf9156225f5026ff65f86 | |
9 | Patch0: %{name}-curses.patch | |
10 | Patch1: %{name}-libs.patch | |
11 | Patch2: %{name}-FHS.patch | |
12 | URL: http://cunit.sourceforge.net/ | |
13 | BuildRequires: autoconf | |
14 | BuildRequires: automake | |
15 | BuildRequires: ncurses-devel | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | CUnit is a lightweight system for writing, administering, and running | |
20 | unit tests in C. It provides C programmers a basic testing | |
21 | functionality with a flexible variety of user interfaces. | |
22 | ||
23 | CUnit is built as a static library which is linked with the user's | |
24 | testing code. It uses a simple framework for building test structures, | |
25 | and provides a rich set of assertions for testing common data types. | |
26 | In addition, several different interfaces are provided for running | |
27 | tests and reporting results. | |
28 | ||
29 | %prep | |
30 | %setup -q -n %{name}-%{version}-2 | |
31 | %patch0 -p1 | |
32 | %patch1 -p1 | |
33 | %patch2 -p1 | |
34 | ||
35 | %build | |
36 | %{__aclocal} | |
37 | %{__autoconf} | |
38 | %{__autoheader} | |
39 | %{__automake} | |
40 | %configure \ | |
41 | %{?debug:--enable-debug} \ | |
42 | --enable-curses | |
43 | %{__make} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %{__make} install \ | |
49 | DESTDIR=$RPM_BUILD_ROOT | |
50 | ||
51 | rm -rf html headers | |
52 | # can't package %doc %{_docdir}/%{name}-%{version} as rpm fails: | |
53 | # error: magic_file(ms, "/home/builder/tmp/cunit-2.0-root-builder/usr/share/doc/cunit-2.0/headers") | |
54 | # failed: mode 040755 cannot open `/home/builder/tmp/cunit-2.0-root-builder/usr/share/doc/cunit-2.0/headers' (No such file or directory) | |
55 | # rpmbuild: rpmfc.c:1564: rpmfcClassify: Assertion `ftype != ((void *)0)' failed. | |
56 | mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{html,headers} . | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc AUTHORS ChangeLog NEWS README TODO | |
64 | %doc html headers | |
65 | %{_includedir}/CUnit | |
66 | # maybe attempt to make .so too? | |
67 | %{_libdir}/libcunit.a | |
68 | %{_datadir}/CUnit | |
69 | ||
70 | # dunno, worth to package these at all? | |
71 | %dir %{_libdir}/CUnit | |
72 | %dir %{_libdir}/CUnit/Examples | |
73 | %dir %{_libdir}/CUnit/Examples/Automated | |
74 | %attr(755,root,root) %{_libdir}/CUnit/Examples/Automated/AutomatedTest | |
75 | %{_libdir}/CUnit/Examples/Automated/README | |
76 | ||
77 | %dir %{_libdir}/CUnit/Examples/Basic | |
78 | %attr(755,root,root) %{_libdir}/CUnit/Examples/Basic/BasicTest | |
79 | %{_libdir}/CUnit/Examples/Basic/README | |
80 | ||
81 | %dir %{_libdir}/CUnit/Examples/Console | |
82 | %attr(755,root,root) %{_libdir}/CUnit/Examples/Console/ConsoleTest | |
83 | %{_libdir}/CUnit/Examples/Console/README | |
84 | ||
85 | %dir %{_libdir}/CUnit/Examples/Curses | |
86 | %attr(755,root,root) %{_libdir}/CUnit/Examples/Curses/CursesTest | |
87 | %{_libdir}/CUnit/Examples/Curses/README | |
88 | ||
89 | %dir %{_libdir}/CUnit/Test | |
90 | %attr(755,root,root) %{_libdir}/CUnit/Test/test_cunit | |
91 | ||
92 | %{_mandir}/man3/CUnit.3* |