Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > ca2d2d75ec5920a9266f007bbae17fab > files > 3

cunit-2.1.0-8mdv2010.0.src.rpm

%define name cunit
%define Name CUnit
%define version 2.1.0
%define bad_version 2.1-0
%define release %mkrel 8
%define	major 1
%define	libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPLv2+
Summary:	A Unit Testing Framework for C
Group:		System/Libraries
URL:		http://cunit.sourceforge.net
Source:		http://prdownloads.sourceforge.net/cunit/%{Name}-%{bad_version}-src.tar.gz
Patch0:		%{name}-2.1.0.link_against_ncurses.patch
BuildRequires:	ncurses-devel
Buildroot:	%{_tmppath}/%{name}-%{version}-buildroot

%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.

CUnit is built as a static library which is linked with the user's testing
code.  It uses a simple framework for building test structures, and provides a
rich set of assertions for testing common data types. In addition, several
different interfaces are provided for running tests and reporting results.
These interfaces currently include:

- Automated: Non-interactive output to xml file
- Basic: Non-interactive flexible programming interface
- Console: Interactive console interface (ansi C)
- Curses: Interactive graphical interface (Unix)

%package -n %{libname}
Summary:	C testing framework
Group:		System/Libraries

%description -n %{libname}
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.

CUnit is built as a static library which is linked with the user's testing
code.  It uses a simple framework for building test structures, and provides a
rich set of assertions for testing common data types. In addition, several
different interfaces are provided for running tests and reporting results.
These interfaces currently include:

- Automated: Non-interactive output to xml file
- Basic: Non-interactive flexible programming interface
- Console: Interactive console interface (ansi C)
- Curses: Interactive graphical interface (Unix)

%package -n %{develname}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Obsoletes:	%mklibname %{name} 1 -d

%description -n	%{develname}
This package contains development files for %{name}.

%prep
%setup -q -n %{Name}-%{bad_version}
%patch0 -p 0
chmod 644 AUTHORS NEWS ChangeLog README TODO

%build
autoreconf -f -i
%configure2_5x \
	--enable-curses
%make

%install
rm -rf %{buildroot}
%makeinstall_std

# fix la file
perl -pi -e 's| -L\S+ ||'  %{buildroot}%{_libdir}/libcunit.la

# ugly, but needed to deal with installed and non-installed documentation
install -d -m 755 %{buildroot}%{_datadir}/doc/%{libname}-devel-%{version}
mv %{buildroot}%{_prefix}/doc/%{Name} \
    %{buildroot}%{_datadir}/doc/%{libname}-devel-%{version}/html
install -m 644 AUTHORS NEWS ChangeLog README TODO \
    %{buildroot}%{_datadir}/doc/%{libname}-devel-%{version} 
rm -rf %{buildroot}%{_prefix}/doc

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%defattr(-,root,root)
%{_datadir}/doc/%{libname}-devel-%{version}
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/*.a
%{_includedir}/%{Name}
%{_datadir}/%{Name}
%{_mandir}/man3/*


%changelog
* Sun Sep 13 2009 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.0-8mdv2010.0
+ Revision: 438702
- fix build

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild

* Wed Jul 23 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.1.0-6mdv2009.0
+ Revision: 243806
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Thu Jan 31 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.1.0-4mdv2008.1
+ Revision: 160841
- new devel library policy
- new license policy
- spec file clean

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - fix autoconf-2.5x path


* Mon Jan 08 2007 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.0-3mdv2007.0
+ Revision: 106077
- rebuild to force arch sync
- Import cunit

* Wed Aug 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.0-2mdv2007.0
- force linking against ncurses, to avoid unresolved symbols for unaware users

* Wed Jun 14 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.0-1mdv2007.0
- enable curses interface

* Fri Jun 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.0-0mdv2007.0
- first mdv release