bef2a4
Name:           check
bef2a4
Version:        0.12.0
bef2a4
Release:        2%{?dist}
bef2a4
Summary:        A unit test framework for C
bef2a4
Source0:        https://github.com/libcheck/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
bef2a4
License:        LGPLv2+
bef2a4
URL:            http://libcheck.github.io/check/
bef2a4
# Only needed for autotools in Fedora
bef2a4
Patch0:         %{name}-0.11.0-info-in-builddir.patch
bef2a4
# Fix test failures due to varying floating point behavior across platforms
bef2a4
Patch1:         %{name}-0.11.0-fp.patch
bef2a4
bef2a4
BuildRequires:  gcc
bef2a4
BuildRequires:  libtool
bef2a4
BuildRequires:  patchutils
bef2a4
BuildRequires:  pkgconfig
bef2a4
BuildRequires:  texinfo
bef2a4
bef2a4
Requires(post): info
bef2a4
Requires(preun): info
bef2a4
bef2a4
%description
bef2a4
Check is a unit test framework for C. It features a simple interface for 
bef2a4
defining unit tests, putting little in the way of the developer. Tests 
bef2a4
are run in a separate address space, so Check can catch both assertion 
bef2a4
failures and code errors that cause segmentation faults or other signals. 
bef2a4
The output from unit tests can be used within source code editors and IDEs.
bef2a4
bef2a4
%package devel
bef2a4
Summary:        Libraries and headers for developing programs with check
bef2a4
Requires:       pkgconfig
bef2a4
Requires:       %{name}%{?_isa} = %{version}-%{release}
bef2a4
bef2a4
%description devel
bef2a4
Libraries and headers for developing programs with check
bef2a4
bef2a4
%package static
bef2a4
Summary:        Static libraries of check
bef2a4
bef2a4
%description static
bef2a4
Static libraries of check.
bef2a4
bef2a4
%package checkmk
bef2a4
Summary:        Translate concise versions of test suites into C programs
bef2a4
License:        BSD
bef2a4
BuildArch:      noarch
bef2a4
Requires:       %{name} = %{version}-%{release}
bef2a4
bef2a4
%description checkmk
bef2a4
The checkmk binary translates concise versions of test suites into C
bef2a4
programs suitable for use with the Check unit test framework.
bef2a4
bef2a4
%prep
bef2a4
%setup -q
bef2a4
%if 0%{?fedora}
bef2a4
%patch0 -p1 -b .info-in-builddir
bef2a4
%endif
bef2a4
%patch1
bef2a4
bef2a4
# Fix detection of various time-related function declarations
bef2a4
sed -e '/DECLS(\[a/s|)|,,,[AC_INCLUDES_DEFAULT\n[#include <time.h>\n #include <sys/time.h>]]&|' \
bef2a4
    -i configure.ac
bef2a4
bef2a4
# Get rid of version control files
bef2a4
find . -name .cvsignore -exec rm {} +
bef2a4
bef2a4
# Regenerate configure due to patch 0
bef2a4
autoreconf -ivf
bef2a4
bef2a4
%build
bef2a4
%configure
bef2a4
bef2a4
# Get rid of undesirable hardcoded rpaths
bef2a4
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
bef2a4
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
bef2a4
    -i libtool
bef2a4
bef2a4
make %{?_smp_mflags}
bef2a4
bef2a4
%install
bef2a4
make DESTDIR=$RPM_BUILD_ROOT install
bef2a4
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
bef2a4
rm -rf $RPM_BUILD_ROOT%{_infodir}/dir
bef2a4
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
bef2a4
bef2a4
bef2a4
%check
bef2a4
export LD_LIBRARY_PATH=$PWD/src/.libs
bef2a4
make check
bef2a4
# Don't need to package the sh, log or trs files
bef2a4
# when we scoop the other checkmk/test files for doc
bef2a4
rm -rf checkmk/test/check_checkmk*
bef2a4
# these files are empty
bef2a4
rm -rf checkmk/test/empty_input
bef2a4
bef2a4
%post
bef2a4
/sbin/ldconfig
bef2a4
if [ -e %{_infodir}/%{name}.info* ]; then
bef2a4
  /sbin/install-info \
bef2a4
    --entry='* Check: (check).               A unit testing framework for C.' \
bef2a4
    %{_infodir}/%{name}.info %{_infodir}/dir || :
bef2a4
fi
bef2a4
bef2a4
%postun -p /sbin/ldconfig
bef2a4
bef2a4
%preun
bef2a4
if [ $1 = 0 -a -e %{_infodir}/%{name}.info* ]; then
bef2a4
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
bef2a4
fi
bef2a4
bef2a4
%files
bef2a4
%doc AUTHORS ChangeLog
bef2a4
%license COPYING.LESSER
bef2a4
%{_libdir}/libcheck.so.*
bef2a4
%{_infodir}/check*
bef2a4
bef2a4
%files devel
bef2a4
%doc doc/example
bef2a4
%{_includedir}/check.h
bef2a4
%{_includedir}/check_stdint.h
bef2a4
%{_libdir}/libcheck.so
bef2a4
%{_libdir}/pkgconfig/check.pc
bef2a4
%{_datadir}/aclocal/check.m4
bef2a4
bef2a4
#check used to be static only, hence this.
bef2a4
%files static
bef2a4
%license COPYING.LESSER
bef2a4
%{_libdir}/libcheck.a
bef2a4
bef2a4
%files checkmk
bef2a4
%doc checkmk/README checkmk/examples
bef2a4
%doc checkmk/test
bef2a4
%{_bindir}/checkmk
bef2a4
%{_mandir}/man1/checkmk.1*
bef2a4
bef2a4
%changelog
bef2a4
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 0.12.0-2
bef2a4
- Build without subunit support
bef2a4
bef2a4
* Mon Jan 29 2018 Jerry James <loganjerry@gmail.com> - 0.12.0-1
bef2a4
- Update to 0.12.0
bef2a4
bef2a4
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-4
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
bef2a4
bef2a4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-3
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bef2a4
bef2a4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bef2a4
bef2a4
* Wed Dec 21 2016 Tom Callaway <spot@fedoraproject.org> - 0.11.0-1
bef2a4
- update to 0.11.0
bef2a4
bef2a4
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-3
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bef2a4
bef2a4
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 0.10.0-2
bef2a4
- rebuild for ICU 56.1
bef2a4
bef2a4
* Fri Aug  7 2015 Jerry James <loganjerry@gmail.com> - 0.10.0-1
bef2a4
- Update to 0.10.0
bef2a4
bef2a4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-3
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
bef2a4
bef2a4
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bef2a4
bef2a4
* Mon Jul 28 2014 Jerry James <loganjerry@gmail.com> - 0.9.14-1
bef2a4
- New upstream version
bef2a4
- Drop -volatile patch, no longer needed
bef2a4
- Update time-related configure fix again
bef2a4
bef2a4
* Mon Jun  9 2014 Jerry James <loganjerry@gmail.com> - 0.9.13-2
bef2a4
- Add -volatile patch to fix test failure
bef2a4
- Update time-related configure fix
bef2a4
bef2a4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bef2a4
bef2a4
* Mon Jun  2 2014 Tom Callaway <spot@fedoraproject.org> - 0.9.13-1
bef2a4
- update to 0.9.13
bef2a4
bef2a4
* Fri Apr 25 2014 Jerry James <loganjerry@gmail.com> - 0.9.12-2
bef2a4
- Build with subunit support
bef2a4
- Remove unused aarch64 patch
bef2a4
bef2a4
* Tue Jan 21 2014 Tom Callaway <spot@fedoraproject.org> - 0.9.12-1
bef2a4
- update to 0.9.12
bef2a4
bef2a4
* Tue Nov  5 2013 Tom Callaway <spot@fedoraproject.org> - 0.9.11-1
bef2a4
- update to 0.9.11
bef2a4
- use autoreconf -ivf instead of the patch
bef2a4
bef2a4
* Mon Aug  5 2013 Jerry James <loganjerry@gmail.com> - 0.9.10-3
bef2a4
- Drop -format patch, upstreamed
bef2a4
- Fix detection of more time-related functions
bef2a4
- Give checkmk its own subpackage for licensing reasons
bef2a4
- Add a check script
bef2a4
bef2a4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.10-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bef2a4
bef2a4
* Thu Apr 18 2013 Tom Callaway <spot@fedoraproject.org> - 0.9.10-1
bef2a4
- update to 0.9.10
bef2a4
bef2a4
* Mon Mar 25 2013 Jerry James <loganjerry@gmail.com> - 0.9.9-3
bef2a4
- Enable aarch64 support (bz 925218)
bef2a4
bef2a4
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bef2a4
bef2a4
* Mon Oct 22 2012 Jerry James <loganjerry@gmail.com> - 0.9.9-1
bef2a4
- New upstream version
bef2a4
- Drop upstream patch for 0.9.8; fix now merged
bef2a4
bef2a4
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8-6
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
bef2a4
bef2a4
* Tue May 15 2012 Jerry James <loganjerry@gmail.com> - 0.9.8-5
bef2a4
- Add upstream patch for bz 821933
bef2a4
bef2a4
* Fri Jan  6 2012 Jerry James <loganjerry@gmail.com> - 0.9.8-4
bef2a4
- Rebuild for GCC 4.7
bef2a4
- Minor spec file cleanups.
bef2a4
bef2a4
* Mon Feb 14 2011 Jerry James <loganjerry@gmail.com> - 0.9.8-3
bef2a4
- Rebuild for new gcc (Fedora 15 mass rebuild)
bef2a4
bef2a4
* Mon Nov 29 2010 Jerry James <loganjerry@gmail.com> - 0.9.8-2
bef2a4
- Add license file to -static package.
bef2a4
- Remove BuildRoot tag.
bef2a4
bef2a4
* Mon Sep 28 2009 Jerry James <loganjerry@gmail.com> - 0.9.8-1
bef2a4
- Update to 0.9.8
bef2a4
bef2a4
* Thu Aug  6 2009 Jerry James <loganjerry@gmail.com> - 0.9.6-5
bef2a4
- Support --excludedocs (bz 515933)
bef2a4
- Replace broken upstream info dir entry
bef2a4
bef2a4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-4
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bef2a4
bef2a4
* Tue Apr  7 2009 Jerry James <loganjerry@gmail.com> - 0.9.6-3
bef2a4
- Add check-0.9.6-strdup.patch
bef2a4
bef2a4
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
bef2a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bef2a4
bef2a4
* Tue Jan  6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9.6-1
bef2a4
- update to 0.9.6
bef2a4
bef2a4
* Mon Dec  1 2008 Jerry James <loganjerry@gmail.com> - 0.9.5-3
bef2a4
- Fix unowned directory (bz 473635)
bef2a4
- Drop unnecessary BuildRequires
bef2a4
- Replace patches with addition of -fPIC to CFLAGS in the spec file
bef2a4
- Add some more documentation files
bef2a4
bef2a4
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.5-2.1
bef2a4
- Autorebuild for GCC 4.3
bef2a4
bef2a4
* Thu Aug  2 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.5-1
bef2a4
- 0.9.5 bump
bef2a4
bef2a4
* Fri Jul 14 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-5
bef2a4
- rebuild
bef2a4
bef2a4
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-4.fc5.2
bef2a4
- bump again for double-long bug on ppc(64)
bef2a4
bef2a4
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-4.fc5.1
bef2a4
- rebuilt for new gcc4.1 snapshot and glibc changes
bef2a4
bef2a4
* Mon Dec 19 2005 Warren Togami <wtogami@redhat.com> 0.9.2-4
bef2a4
- import into FC5 for gstreamer-0.10
bef2a4
bef2a4
* Fri Dec  2 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-3
bef2a4
- enabled -fPIC to resolve bz 174313
bef2a4
bef2a4
* Sat Sep 17 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-2
bef2a4
- get rid of the so file (not needed)
bef2a4
- only make devel package
bef2a4
bef2a4
* Sun Aug 14 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-1
bef2a4
- initial package for Fedora Extras