Blame SPECS/cmocka.spec

b96be1
Name:           cmocka
b96be1
Version:        1.1.5
b96be1
Release:        11%{?dist}
b96be1
b96be1
License:        ASL 2.0
b96be1
Summary:        An elegant unit testing framework for C with support for mock objects
b96be1
URL:            https://cmocka.org
b96be1
b96be1
Source0:        https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz
b96be1
Source1:        https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz.asc
b96be1
Source2:        cmocka.keyring
b96be1
b96be1
BuildRequires:  gcc
b96be1
BuildRequires:  cmake
b96be1
BuildRequires:  doxygen
b96be1
BuildRequires:  glibc-devel
b96be1
BuildRequires:  gnupg2
b96be1
b96be1
%description
b96be1
There are a variety of C unit testing frameworks available however many of them
b96be1
are fairly complex and require the latest compiler technology. Some development
b96be1
requires the use of old compilers which makes it difficult to use some unit
b96be1
testing frameworks. In addition many unit testing frameworks assume the code
b96be1
being tested is an application or module that is targeted to the same platform
b96be1
that will ultimately execute the test. Because of this assumption many
b96be1
frameworks require the inclusion of standard C library headers in the code
b96be1
module being tested which may collide with the custom or incomplete
b96be1
implementation of the C library utilized by the code under test.
b96be1
b96be1
Cmocka only requires a test application is linked with the standard C library
b96be1
which minimizes conflicts with standard C library headers. Also, CMocka tries
b96be1
to avoid the use of some of the newer features of C compilers.
b96be1
b96be1
This results in CMocka being a relatively small library that can be used to
b96be1
test a variety of exotic code. If a developer wishes to simply test an
b96be1
application with the latest compiler then other unit testing frameworks may be
b96be1
preferable.
b96be1
b96be1
This is the successor of Google's Cmockery.
b96be1
b96be1
%package -n libcmocka
b96be1
Summary:        Lightweight library to simplify and generalize unit tests for C
b96be1
b96be1
Conflicts: cmockery2
b96be1
b96be1
%description -n libcmocka
b96be1
There are a variety of C unit testing frameworks available however many of them
b96be1
are fairly complex and require the latest compiler technology. Some development
b96be1
requires the use of old compilers which makes it difficult to use some unit
b96be1
testing frameworks. In addition many unit testing frameworks assume the code
b96be1
being tested is an application or module that is targeted to the same platform
b96be1
that will ultimately execute the test. Because of this assumption many
b96be1
frameworks require the inclusion of standard C library headers in the code
b96be1
module being tested which may collide with the custom or incomplete
b96be1
implementation of the C library utilized by the code under test.
b96be1
b96be1
CMocka only requires a test application is linked with the standard C library
b96be1
which minimizes conflicts with standard C library headers. Also, CMocka tries
b96be1
to avoid the use of some of the newer features of C compilers.
b96be1
b96be1
This results in CMocka being a relatively small library that can be used to
b96be1
test a variety of exotic code. If a developer wishes to simply test an
b96be1
application with the latest compiler then other unit testing frameworks may be
b96be1
preferable.
b96be1
b96be1
This is the successor of Google's Cmockery.
b96be1
b96be1
%package -n libcmocka-static
b96be1
Summary:        Lightweight library to simplify and generalize unit tests for C
b96be1
b96be1
%description -n libcmocka-static
b96be1
Static version of the cmocka library.
b96be1
b96be1
%package -n libcmocka-devel
b96be1
Summary:        Development headers for the cmocka library
b96be1
Requires:       libcmocka = %{version}-%{release}
b96be1
b96be1
Conflicts: cmockery2-devel
b96be1
b96be1
%description -n libcmocka-devel
b96be1
Development headers for the cmocka unit testing library.
b96be1
b96be1
%package -n cmocka-doc
b96be1
Summary:        API documentation for the cmocka unit testing framework
b96be1
BuildArch:      noarch
b96be1
b96be1
%description -n cmocka-doc
b96be1
This package provides the API documentation for the cmocka unit testing
b96be1
framework.
b96be1
b96be1
%prep
b96be1
%autosetup -p1
b96be1
b96be1
%build
b96be1
# This package uses -Wl,-wrap to wrap calls at link time.  This is incompatible
b96be1
# with LTO.
b96be1
# Disable LTO
b96be1
%define _lto_cflags %{nil}
b96be1
b96be1
%cmake \
b96be1
  -DWITH_STATIC_LIB=ON \
b96be1
  -DWITH_CMOCKERY_SUPPORT=ON \
b96be1
  -DUNIT_TESTING=ON
b96be1
b96be1
%cmake_build
b96be1
%__cmake --build %{__cmake_builddir} --target docs
b96be1
b96be1
%install
b96be1
%cmake_install
b96be1
ln -s libcmocka.so %{buildroot}%{_libdir}/libcmockery.so
b96be1
b96be1
%ldconfig_scriptlets -n libcmocka
b96be1
b96be1
%check
b96be1
%ctest
b96be1
b96be1
%files -n libcmocka
b96be1
%doc AUTHORS README.md ChangeLog
b96be1
%license COPYING
b96be1
%{_libdir}/libcmocka.so.*
b96be1
b96be1
%files -n libcmocka-static
b96be1
%{_libdir}/libcmocka-static.a
b96be1
b96be1
%files -n libcmocka-devel
b96be1
%{_includedir}/cmocka.h
b96be1
%{_includedir}/cmocka_pbc.h
b96be1
%{_includedir}/cmockery/cmockery.h
b96be1
%{_includedir}/cmockery/pbc.h
b96be1
%{_libdir}/libcmocka.so
b96be1
%{_libdir}/libcmockery.so
b96be1
%{_libdir}/pkgconfig/cmocka.pc
b96be1
%{_libdir}/cmake/cmocka/cmocka-config-version.cmake
b96be1
%{_libdir}/cmake/cmocka/cmocka-config.cmake
b96be1
b96be1
%files -n cmocka-doc
b96be1
%doc %{__cmake_builddir}/doc/html
b96be1
b96be1
%changelog
b96be1
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.5-11
b96be1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
b96be1
  Related: rhbz#1991688
b96be1
b96be1
* Thu Jun 24 2021 Andreas Schneider <asn@redhat.com> - 1.1.5-10
b96be1
- resolves: rhbz#1915369 - Split out a cmocka-doc package
b96be1
b96be1
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.5-9
b96be1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
b96be1
b96be1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-8
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b96be1
b96be1
* Wed Aug 05 2020 Andreas Schneider <asn@redhat.com> - 1.1.5-7
b96be1
- Correctly build with new cmake macros
b96be1
b96be1
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-6
b96be1
- Second attempt - Rebuilt for
b96be1
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b96be1
b96be1
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-5
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b96be1
b96be1
* Wed Jul  1 2020 Jeff Law <law@redhat.com> - 1.1.5-4
b96be1
- Disable LTO
b96be1
b96be1
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-3
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b96be1
b96be1
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b96be1
b96be1
* Thu Mar 28 2019 Andreas Schneider <asn@redhat.com> - 1.1.5-1
b96be1
- Update to version 1.1.5
b96be1
b96be1
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b96be1
b96be1
* Thu Sep 27 2018 Andreas Schneider <asn@redhat.com> - 1.1.3-1
b96be1
- Update to version 1.1.3
b96be1
b96be1
* Wed Aug 29 2018 Andreas Schneider <asn@redhat.com> - 1.1.2-1
b96be1
- Update to version 1.1.2
b96be1
b96be1
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-9
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b96be1
b96be1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-8
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b96be1
b96be1
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-7
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b96be1
b96be1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b96be1
b96be1
* Tue Mar 28 2017 Than Ngo <than@redhat.com> - 1.1.0-5
b96be1
- added workaround for gcc7 bug on ppc64le temporary 
b96be1
b96be1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b96be1
b96be1
* Wed Sep 21 2016 Jakub Hrozek <jhrozek@redhat.com> - 1.1.0-1
b96be1
- Update to version 1.1.0
b96be1
    * Added support to catch multiple exceptions
b96be1
    * Added support to verify call ordering
b96be1
    * Added support to pass initial data to test cases
b96be1
    * Added will_return_maybe() for ignoring mock returns
b96be1
    * Added subtests for groups using TAP output
b96be1
    * Added support to write multiple XML files for groups
b96be1
    * Improved documentation
b96be1
    * Fixed XML output generataion
b96be1
    * Fixed Windows builds with VS2015
b96be1
b96be1
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b96be1
b96be1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b96be1
b96be1
* Thu Mar 12 2015 Andreas Schneider <asn@redhat.com> - 1.0.1-1
b96be1
- Update to version 1.0.1:
b96be1
  * Added a macro for assert_ptr_equal().
b96be1
  * Fixed test_realloc() if 0 size is passed.
b96be1
  * Fixed objects packaging bug.
b96be1
  * Fixed building with newer gcc versions.
b96be1
b96be1
* Mon Feb 16 2015 Andreas Schneider <asn@redhat.com> - 1.0.0-1
b96be1
- Update to version 1.0.0:
b96be1
  * Added new test runner with group fixtures. The old runner is deprecated
b96be1
  * Added an extensible message output formatter
b96be1
  * Added jUnit XML message output
b96be1
  * Added subunit message output
b96be1
  * Added Test Anything Protocol message output
b96be1
  * Added skip() command
b96be1
  * Added test_realloc()
b96be1
  * Added a cmockery compat header
b96be1
  * Fixed a lot of bugs on Windows
b96be1
b96be1
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b96be1
b96be1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b96be1
b96be1
* Mon May 26 2014 - Andreas Schneider <asn@redhat.com> - 0.4.1-1
b96be1
- Update to version 0.4.1.
b96be1
b96be1
* Fri Apr 11 2014 - Andreas Schneider <asn@redhat.com> - 0.4.0-1
b96be1
- Update to version 0.4.0.
b96be1
b96be1
* Wed Nov 06 2013 - Andreas Schneider <asn@redhat.com> - 0.3.2-1
b96be1
- Update to version 0.3.2.
b96be1
- Include API documentation.
b96be1
b96be1
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b96be1
b96be1
* Wed Jul 10 2013 - Andreas Schneider <asn@redhat.com> - 0.3.0-2
b96be1
- Update to version 0.3.1.
b96be1
- Fixed cmocka issues on big endian.
b96be1
- resolves: #975044
b96be1
b96be1
* Wed Jun 05 2013 - Andreas Schneider <asn@redhat.com> - 0.3.0-1
b96be1
- Update to version 0.3.0.
b96be1
b96be1
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
b96be1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b96be1
b96be1
* Fri Jan 18 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-3
b96be1
- Fixed typo in Source URL.
b96be1
b96be1
* Thu Jan 17 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-2
b96be1
- Fixed Source URL.
b96be1
- Fixed package groups.
b96be1
b96be1
* Tue Jan 15 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-1
b96be1
- Initial version 0.2.0