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