First release.

This commit is contained in:
Shakthi Kannan 2011-01-31 20:14:16 +05:30
parent 2a00aa71a0
commit 541240d3bd
5 changed files with 193 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/CUnit-2.1-2-src.tar.bz2

View File

@ -0,0 +1,29 @@
diff -up CUnit-2.1-2/doc/headers/Makefile.am.fix CUnit-2.1-2/doc/headers/Makefile.am
--- CUnit-2.1-2/doc/headers/Makefile.am.fix 2011-01-29 23:02:48.979554008 +0530
+++ CUnit-2.1-2/doc/headers/Makefile.am 2011-01-29 23:03:17.265554008 +0530
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-dochdrdir = $(prefix)/doc/@PACKAGE@/headers
+dochdrdir = $(datarootdir)/doc/@PACKAGE@/headers
INCLUDE_FILES = \
Automated.h \
diff -up CUnit-2.1-2/doc/Makefile.am.fix CUnit-2.1-2/doc/Makefile.am
--- CUnit-2.1-2/doc/Makefile.am.fix 2011-01-29 23:03:29.287553948 +0530
+++ CUnit-2.1-2/doc/Makefile.am 2011-01-29 23:03:43.111554042 +0530
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-docdir = $(prefix)/doc/@PACKAGE@
+docdir = $(datarootdir)/doc/@PACKAGE@
doc_DATA = \
CUnit_doc.css \
@@ -13,4 +13,4 @@ doc_DATA = \
test_registry.html \
writing_tests.html
-SUBDIRS = headers
\ No newline at end of file
+SUBDIRS = headers

View File

@ -0,0 +1,57 @@
diff -up CUnit-2.1-2/Man/man3/CUnit.3.man CUnit-2.1-2/Man/man3/CUnit.3
--- CUnit-2.1-2/Man/man3/CUnit.3.man 2011-01-29 23:04:42.302553933 +0530
+++ CUnit-2.1-2/Man/man3/CUnit.3 2011-01-29 23:06:46.210553841 +0530
@@ -473,7 +473,7 @@ dynamically. The following functions ar
be used instead of directly setting the value of the data structure members. All
return CUE_SUCCESS on success, and the indicated error code on failure.
.P
-.TP5
+.TP 5
.B "CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName)"
.TP 5
.B "CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName)"
@@ -481,7 +481,7 @@ These functions change the name of regis
are available as the
.B pSuite->pName</I>
and
-.BpTest->pName
+.B pTest->pName
data structure members. If the suite or test is NULL, then CUE_NOSUITE or CUE_NOTEST
is returned, respectively. If strNewName is NULL, then CUE_NO_SUITENAME or
CUE_NO_TESTNAME is returned, respectively.
@@ -518,13 +518,13 @@ nothing is known about the suite or test
data structures to enumerate the suites and tests. This is not directly supported in
the client API.
.P
-.TP5
+.TP 5
.B "CU_pSuite CU_get_suite(const char* strName)"
-.TP5
+.TP 5
.B "CU_pSuite CU_get_suite_at_pos(unsigned int pos)"
-.TP5
+.TP 5
.B "unsigned int CU_get_suite_pos(CU_pSuite pSuite)"
-.TP5
+.TP 5
.B "unsigned int CU_get_suite_pos_by_name(const char* strName)"
</P>
These functions facilitate lookup of suites registered in the active test registry.
@@ -539,13 +539,13 @@ These return 0 if the suite cannot be fo
CUnit error state to CUE_NOREGISTRY> if the registry is not initialized. As appropriate,
CUE_NO_SUITENAME is set if strName is NULL, and CUE_NOSUITE is set if pSuite is NULL.
.P
-.TP5
+.TP 5
.B "CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName)"
-.TP5
+.TP 5
.B "CU_pTest CU_get_test_at_pos<(CU_pSuite pSuite, unsigned int pos)"
-.TP5
+.TP 5
.B "unsigned int CU_get_test_pos<(CU_pSuite pSuite, CU_pTest pTest)"
-.TP5
+.TP 5
.B "unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName)"
These functions facilitate lookup of tests registered in suites. The first
2 functions allow lookup of the test by name or position and return NULL if the

105
CUnit.spec Normal file
View File

@ -0,0 +1,105 @@
Name: CUnit
Version: 2.1.2
Release: 6%{?dist}
Summary: A unit testing framework for C
Group: System Environment/Libraries
License: LGPLv2+
URL: http://cunit.sourceforge.net/
Source0: http://downloads.sourceforge.net/cunit/%{name}-2.1-2-src.tar.bz2
# Fixes docroot path and manpage errors
Patch0: CUnit-2.1-2-docroot-fix.patch
Patch1: CUnit-2.1-2-manpage-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake
%description
CUnit is a lightweight system for writing, administering,
and running unit tests in C. It provides C programmers a basic
testing functionality with a flexible variety of user interfaces.
%package devel
Summary: Header files and libraries for CUnit development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
The %{name}-devel package contains the header files
and libraries for use with CUnit package.
%prep
%setup -q -n %{name}-2.1-2
%patch0 -p1 -b .fix
%patch1 -p1 -b .man
find -name *.c -exec chmod -x {} \;
%build
%configure
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f `find %{buildroot} -name *.a`
rm -f `find %{buildroot} -name *.la`
rm -rf `find %{buildroot} -name %{name}-%{version}/`
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README TODO
%{_datadir}/%{name}/
%{_libdir}/libcunit.so.*
%files devel
%defattr(-,root,root,-)
%{_docdir}/%{name}/
%{_includedir}/%{name}/
%{_libdir}/libcunit.so
%{_libdir}/pkgconfig/cunit.pc
%{_mandir}/man3/CUnit.3*
%changelog
* Sat Jan 29 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.2-6
- Changed Group to System Environment/Libraries.
- Remove executable permission from C files.
- Created two separate patches for Makefile and manpage fixes.
- Removed passing datarootdir from configure.
* Thu Jan 20 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1.2-5
- Renamed Source0 to use Fedora sourceforge.net naming guidelines.
- Removed exit call in library patch.
- Use A.B.C version number.
* Thu Jan 20 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1_2-4
- Updated to license LGPLv2+.
- Changed to use BuildRoot.
- Added comments for inclusion of patches.
- Removed inconsistent macro usage.
- Moved man page, HTML documentation to devel package.
- Added AUTHORS, COPYING, README, TODO to doc in base package.
- Used * in man, library inclusion.
* Sun Dec 26 2010 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1_2-3
- Created patch to fix man page warnings and datarootdir settings.
- Added patch to remove exit calls in library.
* Wed Dec 15 2010 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1_2-2
- Moved libcunit.so.* to main package.
- Added post, postun ldconfig.
- Added smp flags for make build.
- Changed datarootdir to datadir.
* Tue Dec 14 2010 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> 2.1_2-1
- First CUnit package.

View File

@ -0,0 +1 @@
31c62bd7a65007737ba28b7aafc44d3a CUnit-2.1-2-src.tar.bz2