Name: check Version: 0.9.8 Release: 1 Summary: A unit test framework for C Source0: http://downloads.sourceforge.net/check/%{name}-%{version}.tar.gz Group: Development/Tools License: LGPLv2+ URL: http://check.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make Requires: info, /sbin/install-info %description Check is a unit test framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries and headers for developing programs with check Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel Libraries and headers for developing programs with check If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q %build # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --disable-subunit gmake %{?_smp_mflags} cp src/.libs/lib%{name}.so.0 . gmake distclean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --disable-subunit gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q src/.libs/lib%{name}.a ./lib%{name}.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*info ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post if [ -e %{_infodir}/%{name}.info* ]; then /sbin/install-info \ --entry='* Check: (check). A unit testing framework for C.' \ %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %preun if [ $1 = 0 -a -e %{_infodir}/%{name}.info* ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %files %defattr(-,root,system,-) %doc AUTHORS COPYING.LESSER ChangeLog ChangeLogOld NEWS README SVNChangeLog %doc THANKS TODO %{_libdir}/*.a %{_infodir}/check* /usr/lib/*.a %files devel %defattr(-,root,system,-) %doc doc/example %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/* /usr/include/* /usr/lib/*.la %changelog * Thu Nov 19 2009 Michael Perzl - 0.9.8-1 - first version for AIX V5.1 and higher