ea0cca
Name:           check
ea0cca
Version:        0.15.2
84ea3b
Release:        6%{?dist}
ea0cca
Summary:        A unit test framework for C
ea0cca
Source0:        https://github.com/libcheck/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
ea0cca
License:        LGPLv2+
ea0cca
URL:            http://libcheck.github.io/check/
ea0cca
# Only needed for autotools in Fedora
ea0cca
Patch0:         %{name}-0.11.0-info-in-builddir.patch
ea0cca
# Fix test failures due to varying floating point behavior across platforms
ea0cca
Patch1:         %{name}-0.11.0-fp.patch
ea0cca
ea0cca
BuildRequires:  cmake
ea0cca
BuildRequires:  gcc
ea0cca
BuildRequires:  libtool
ea0cca
BuildRequires:  make
ea0cca
BuildRequires:  patchutils
ea0cca
BuildRequires:  pkgconfig
ea0cca
%if ! 0%{?rhel}
ea0cca
BuildRequires:  pkgconfig(libsubunit)
ea0cca
%endif
ea0cca
BuildRequires:  texinfo, texlive-tex, graphviz
ea0cca
ea0cca
%description
ea0cca
Check is a unit test framework for C. It features a simple interface for 
ea0cca
defining unit tests, putting little in the way of the developer. Tests 
ea0cca
are run in a separate address space, so Check can catch both assertion 
ea0cca
failures and code errors that cause segmentation faults or other signals. 
ea0cca
The output from unit tests can be used within source code editors and IDEs.
ea0cca
ea0cca
%package devel
ea0cca
Summary:        Libraries and headers for developing programs with check
ea0cca
Requires:       %{name}%{?_isa} = %{version}-%{release}
ea0cca
ea0cca
%description devel
ea0cca
Libraries and headers for developing programs with check
ea0cca
ea0cca
%package static
ea0cca
Summary:        Static libraries of check
ea0cca
ea0cca
%description static
ea0cca
Static libraries of check.
ea0cca
ea0cca
%package checkmk
ea0cca
Summary:        Translate concise versions of test suites into C programs
ea0cca
License:        BSD
ea0cca
BuildArch:      noarch
ea0cca
Requires:       %{name} = %{version}-%{release}
ea0cca
ea0cca
%description checkmk
ea0cca
The checkmk binary translates concise versions of test suites into C
ea0cca
programs suitable for use with the Check unit test framework.
ea0cca
ea0cca
%prep
ea0cca
%setup -q
ea0cca
%if 0%{?fedora}
ea0cca
%patch0 -p1 -b .info-in-builddir
ea0cca
%endif
ea0cca
%patch1 -p1
ea0cca
ea0cca
# Fix detection of various time-related function declarations
ea0cca
sed -e '/DECLS(\[a/s|)|,,,[AC_INCLUDES_DEFAULT\n[#include <time.h>\n #include <sys/time.h>]]&|' \
ea0cca
    -i configure.ac
ea0cca
ea0cca
# Get rid of version control files
ea0cca
find . -name .cvsignore -delete
ea0cca
ea0cca
# Regenerate configure due to patch 0
ea0cca
autoreconf -ivf
ea0cca
84ea3b
# Fix libdir for the cmake build
84ea3b
sed -i 's,set(libdir .*),set(libdir "%{_libdir}"),' CMakeLists.txt
84ea3b
ea0cca
%build
ea0cca
# The autotools build does not create the cmake files.
ea0cca
# The cmake build does not create the info or aclocal files.
ea0cca
# Therefore we build with both and combine the results to get everything.
ea0cca
mkdir autotools_build
ea0cca
cd autotools_build
ea0cca
%global _configure ../configure
ea0cca
%configure --disable-timeout-tests
ea0cca
ea0cca
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
ea0cca
# -Wl,--as-needed after all the libraries.
ea0cca
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
ea0cca
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
ea0cca
    -e 's|CC="\(.*g..\)"|CC="\1 -Wl,--as-needed"|' \
ea0cca
    -i libtool
ea0cca
ea0cca
%make_build
ea0cca
cd -
ea0cca
ea0cca
%cmake -DCHECK_ENABLE_TIMEOUT_TESTS:BOOL=OFF .
ea0cca
%cmake_build
ea0cca
ea0cca
%install
ea0cca
cd autotools_build
ea0cca
%make_install
ea0cca
rm -rf %{buildroot}%{_libdir}
ea0cca
rm -rf %{buildroot}%{_infodir}/dir
ea0cca
rm -rf %{buildroot}%{_docdir}/%{name}
ea0cca
cd -
ea0cca
ea0cca
%cmake_install
ea0cca
ea0cca
%check
ea0cca
cd autotools_build
ea0cca
export LD_LIBRARY_PATH=$PWD/src/.libs
ea0cca
%ifnarch s390x
ea0cca
make check
ea0cca
%endif
ea0cca
# Don't need to package the sh, log or trs files
ea0cca
# when we scoop the other checkmk/test files for doc
ea0cca
rm -rf checkmk/test/check_checkmk*
ea0cca
# these files are empty
ea0cca
rm -rf checkmk/test/empty_input
ea0cca
cd -
ea0cca
ea0cca
%ldconfig_scriptlets
ea0cca
ea0cca
%files
ea0cca
%doc AUTHORS NEWS
ea0cca
%license COPYING.LESSER
ea0cca
%{_libdir}/libcheck.so.0*
ea0cca
%{_infodir}/check*
ea0cca
ea0cca
%files devel
ea0cca
%doc doc/example
ea0cca
%{_includedir}/check.h
ea0cca
%{_includedir}/check_stdint.h
ea0cca
%{_libdir}/cmake/check/
ea0cca
%{_libdir}/libcheck.so
ea0cca
%{_libdir}/pkgconfig/check.pc
ea0cca
%{_datadir}/aclocal/check.m4
ea0cca
ea0cca
#check used to be static only, hence this.
ea0cca
%files static
ea0cca
%license COPYING.LESSER
ea0cca
%{_libdir}/libcheck.a
ea0cca
ea0cca
%files checkmk
ea0cca
%doc checkmk/README checkmk/examples
ea0cca
%doc checkmk/test
ea0cca
%{_bindir}/checkmk
ea0cca
%{_mandir}/man1/checkmk.1*
ea0cca
ea0cca
%changelog
84ea3b
* Tue Oct 26 2021 Peter Hutterer <peter.hutterer@redhat.com> 0.15.2-6
84ea3b
- Fix the pkgconfig file for lib64 (#2016941)
84ea3b
ea0cca
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.15.2-5
ea0cca
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
ea0cca
  Related: rhbz#1991688
ea0cca
ea0cca
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0.15.2-4
ea0cca
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
ea0cca
ea0cca
* Mon Mar 01 2021 Tomas Popela <tpopela@redhat.com> - 0.15.2-3
ea0cca
- Don't build with subinit support in RHEL
ea0cca
ea0cca
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ea0cca
ea0cca
* Sun Aug  9 2020 Jerry James <loganjerry@gmail.com> - 0.15.2-1
ea0cca
- Version 0.15.2
ea0cca
- Drop upstreamed -fail-macros patch
ea0cca
ea0cca
* Mon Aug  3 2020 Jerry James <loganjerry@gmail.com> - 0.15.1-3
ea0cca
- Add -fail-macros patch
ea0cca
ea0cca
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.1-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ea0cca
ea0cca
* Thu Jul 23 2020 Jerry James <loganjerry@gmail.com> - 0.15.1-1
ea0cca
- Version 0.15.1
ea0cca
- Drop upstreamed -format-spec patch
ea0cca
ea0cca
* Tue Jun 23 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-2
ea0cca
- Drop -attribute-format patch, causes other issues (bz 1850198)
ea0cca
ea0cca
* Mon Jun 22 2020 Jerry James <loganjerry@gmail.com> - 0.15.0-1
ea0cca
- Version 0.15.0
ea0cca
- Add -formatspec and -attribute-format patches
ea0cca
- Build with both cmake and autotools
ea0cca
ea0cca
* Fri Jan 31 2020 Tom Callaway <spot@fedoraproject.org> - 0.14.0-3
ea0cca
- disable tests on s390x
ea0cca
ea0cca
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ea0cca
ea0cca
* Mon Jan 27 2020 Tom Callaway <spot@fedoraproject.org> - 0.14.0-1
ea0cca
- update to 0.14.0
ea0cca
ea0cca
* Mon Dec  2 2019 Tom Callaway <spot@fedoraproject.org> - 0.13.0-2
ea0cca
- package NEWS instead of the obsolete ChangeLog file
ea0cca
ea0cca
* Tue Oct 22 2019 Tom Callaway <spot@fedoraproject.org> - 0.13.0-1
ea0cca
- update to 0.13.0
ea0cca
ea0cca
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.0-5
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ea0cca
ea0cca
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.0-4
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ea0cca
ea0cca
* Mon Jul 23 2018 Jerry James <loganjerry@gmail.com> - 0.12.0-3
ea0cca
- Disable unreliable timeout tests (sometimes fail on busy builders)
ea0cca
ea0cca
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.0-3
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ea0cca
ea0cca
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.0-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ea0cca
ea0cca
* Mon Jan 29 2018 Jerry James <loganjerry@gmail.com> - 0.12.0-1
ea0cca
- Update to 0.12.0
ea0cca
ea0cca
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-4
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ea0cca
ea0cca
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-3
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ea0cca
ea0cca
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ea0cca
ea0cca
* Wed Dec 21 2016 Tom Callaway <spot@fedoraproject.org> - 0.11.0-1
ea0cca
- update to 0.11.0
ea0cca
ea0cca
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-3
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ea0cca
ea0cca
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 0.10.0-2
ea0cca
- rebuild for ICU 56.1
ea0cca
ea0cca
* Fri Aug  7 2015 Jerry James <loganjerry@gmail.com> - 0.10.0-1
ea0cca
- Update to 0.10.0
ea0cca
ea0cca
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-3
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ea0cca
ea0cca
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.14-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ea0cca
ea0cca
* Mon Jul 28 2014 Jerry James <loganjerry@gmail.com> - 0.9.14-1
ea0cca
- New upstream version
ea0cca
- Drop -volatile patch, no longer needed
ea0cca
- Update time-related configure fix again
ea0cca
ea0cca
* Mon Jun  9 2014 Jerry James <loganjerry@gmail.com> - 0.9.13-2
ea0cca
- Add -volatile patch to fix test failure
ea0cca
- Update time-related configure fix
ea0cca
ea0cca
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.13-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ea0cca
ea0cca
* Mon Jun  2 2014 Tom Callaway <spot@fedoraproject.org> - 0.9.13-1
ea0cca
- update to 0.9.13
ea0cca
ea0cca
* Fri Apr 25 2014 Jerry James <loganjerry@gmail.com> - 0.9.12-2
ea0cca
- Build with subunit support
ea0cca
- Remove unused aarch64 patch
ea0cca
ea0cca
* Tue Jan 21 2014 Tom Callaway <spot@fedoraproject.org> - 0.9.12-1
ea0cca
- update to 0.9.12
ea0cca
ea0cca
* Tue Nov  5 2013 Tom Callaway <spot@fedoraproject.org> - 0.9.11-1
ea0cca
- update to 0.9.11
ea0cca
- use autoreconf -ivf instead of the patch
ea0cca
ea0cca
* Mon Aug  5 2013 Jerry James <loganjerry@gmail.com> - 0.9.10-3
ea0cca
- Drop -format patch, upstreamed
ea0cca
- Fix detection of more time-related functions
ea0cca
- Give checkmk its own subpackage for licensing reasons
ea0cca
- Add a check script
ea0cca
ea0cca
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.10-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ea0cca
ea0cca
* Thu Apr 18 2013 Tom Callaway <spot@fedoraproject.org> - 0.9.10-1
ea0cca
- update to 0.9.10
ea0cca
ea0cca
* Mon Mar 25 2013 Jerry James <loganjerry@gmail.com> - 0.9.9-3
ea0cca
- Enable aarch64 support (bz 925218)
ea0cca
ea0cca
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ea0cca
ea0cca
* Mon Oct 22 2012 Jerry James <loganjerry@gmail.com> - 0.9.9-1
ea0cca
- New upstream version
ea0cca
- Drop upstream patch for 0.9.8; fix now merged
ea0cca
ea0cca
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8-6
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ea0cca
ea0cca
* Tue May 15 2012 Jerry James <loganjerry@gmail.com> - 0.9.8-5
ea0cca
- Add upstream patch for bz 821933
ea0cca
ea0cca
* Fri Jan  6 2012 Jerry James <loganjerry@gmail.com> - 0.9.8-4
ea0cca
- Rebuild for GCC 4.7
ea0cca
- Minor spec file cleanups.
ea0cca
ea0cca
* Mon Feb 14 2011 Jerry James <loganjerry@gmail.com> - 0.9.8-3
ea0cca
- Rebuild for new gcc (Fedora 15 mass rebuild)
ea0cca
ea0cca
* Mon Nov 29 2010 Jerry James <loganjerry@gmail.com> - 0.9.8-2
ea0cca
- Add license file to -static package.
ea0cca
- Remove BuildRoot tag.
ea0cca
ea0cca
* Mon Sep 28 2009 Jerry James <loganjerry@gmail.com> - 0.9.8-1
ea0cca
- Update to 0.9.8
ea0cca
ea0cca
* Thu Aug  6 2009 Jerry James <loganjerry@gmail.com> - 0.9.6-5
ea0cca
- Support --excludedocs (bz 515933)
ea0cca
- Replace broken upstream info dir entry
ea0cca
ea0cca
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-4
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ea0cca
ea0cca
* Tue Apr  7 2009 Jerry James <loganjerry@gmail.com> - 0.9.6-3
ea0cca
- Add check-0.9.6-strdup.patch
ea0cca
ea0cca
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
ea0cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ea0cca
ea0cca
* Tue Jan  6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.9.6-1
ea0cca
- update to 0.9.6
ea0cca
ea0cca
* Mon Dec  1 2008 Jerry James <loganjerry@gmail.com> - 0.9.5-3
ea0cca
- Fix unowned directory (bz 473635)
ea0cca
- Drop unnecessary BuildRequires
ea0cca
- Replace patches with addition of -fPIC to CFLAGS in the spec file
ea0cca
- Add some more documentation files
ea0cca
ea0cca
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.5-2.1
ea0cca
- Autorebuild for GCC 4.3
ea0cca
ea0cca
* Thu Aug  2 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.5-1
ea0cca
- 0.9.5 bump
ea0cca
ea0cca
* Fri Jul 14 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-5
ea0cca
- rebuild
ea0cca
ea0cca
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-4.fc5.2
ea0cca
- bump again for double-long bug on ppc(64)
ea0cca
ea0cca
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.9.3-4.fc5.1
ea0cca
- rebuilt for new gcc4.1 snapshot and glibc changes
ea0cca
ea0cca
* Mon Dec 19 2005 Warren Togami <wtogami@redhat.com> 0.9.2-4
ea0cca
- import into FC5 for gstreamer-0.10
ea0cca
ea0cca
* Fri Dec  2 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-3
ea0cca
- enabled -fPIC to resolve bz 174313
ea0cca
ea0cca
* Sat Sep 17 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-2
ea0cca
- get rid of the so file (not needed)
ea0cca
- only make devel package
ea0cca
ea0cca
* Sun Aug 14 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.2-1
ea0cca
- initial package for Fedora Extras