2013-01-14 11:49:38 +01:00
|
|
|
#
|
2013-01-14 11:50:31 +01:00
|
|
|
# spec file for package cmocka
|
2013-01-14 11:49:38 +01:00
|
|
|
#
|
2023-02-17 15:11:52 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2013-01-14 11:50:31 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-27 15:58:55 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-01-14 11:50:31 +01:00
|
|
|
#
|
|
|
|
|
2013-01-14 11:49:38 +01:00
|
|
|
|
2018-08-31 07:49:52 +02:00
|
|
|
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 150000
|
2018-08-30 12:15:20 +02:00
|
|
|
%bcond_without docs
|
2018-08-31 07:49:52 +02:00
|
|
|
%else
|
2018-08-30 10:25:30 +02:00
|
|
|
# We need cmake >= 3.9 to build docs
|
2018-08-30 12:15:20 +02:00
|
|
|
%bcond_with docs
|
2018-08-30 10:25:30 +02:00
|
|
|
%endif
|
|
|
|
|
2013-01-14 11:49:38 +01:00
|
|
|
Name: cmocka
|
2023-02-27 14:16:47 +01:00
|
|
|
Version: 1.1.7
|
2013-01-14 11:50:31 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Lightweight library to simplify and generalize unit tests for C
|
2013-01-14 11:49:38 +01:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Productivity/Networking/Other
|
2018-08-29 18:03:31 +02:00
|
|
|
URL: https://cmocka.org
|
2018-08-30 10:34:07 +02:00
|
|
|
|
2016-10-25 16:06:08 +02:00
|
|
|
Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz
|
2018-08-29 17:16:02 +02:00
|
|
|
Source1: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz.asc
|
|
|
|
Source2: %{name}.keyring
|
|
|
|
Source3: baselibs.conf
|
2018-08-30 10:34:07 +02:00
|
|
|
|
2015-07-15 10:33:23 +02:00
|
|
|
BuildRequires: cmake
|
2018-08-29 18:03:31 +02:00
|
|
|
BuildRequires: doxygen
|
2015-07-15 10:33:23 +02:00
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: pkg-config
|
2023-02-17 15:11:52 +01:00
|
|
|
|
|
|
|
Obsoletes: libcmocka-devel-static < %{version}
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%description
|
2015-02-17 10:18:18 +01:00
|
|
|
cmocka is an elegant unit testing framework for C with support for mock
|
|
|
|
objects. It only requires the standard C library, works on a range of computing
|
|
|
|
platforms (including embedded) and with different compilers.
|
|
|
|
|
|
|
|
Features:
|
|
|
|
* Support for mock objects
|
|
|
|
* Only requires the C library
|
|
|
|
* Several supported output formats (Subunit, TAP, jUnit XML)
|
|
|
|
* Fully documented API
|
|
|
|
* Test fixtures
|
|
|
|
* Exception handling for signals (SIGSEGV, SIGILL, ...)
|
|
|
|
* No fork() used
|
|
|
|
* Very well tested
|
|
|
|
* Testing of memory leaks, buffer overflows and underflows.
|
|
|
|
|
|
|
|
Also, CMocka tries to avoid the use of some of the newer features of C
|
|
|
|
compilers.
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%package -n libcmocka0
|
|
|
|
Summary: Lightweight library to simplify and generalize unit tests for C
|
2013-01-14 11:50:31 +01:00
|
|
|
Group: System/Libraries
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%description -n libcmocka0
|
2015-02-17 10:18:18 +01:00
|
|
|
cmocka is an elegant unit testing framework for C with support for mock
|
|
|
|
objects. It only requires the standard C library, works on a range of computing
|
|
|
|
platforms (including embedded) and with different compilers.
|
|
|
|
|
|
|
|
Features:
|
|
|
|
* Support for mock objects
|
|
|
|
* Only requires the C library
|
|
|
|
* Several supported output formats (Subunit, TAP, jUnit XML)
|
|
|
|
* Fully documented API
|
|
|
|
* Test fixtures
|
|
|
|
* Exception handling for signals (SIGSEGV, SIGILL, ...)
|
|
|
|
* No fork() used
|
|
|
|
* Very well tested
|
|
|
|
* Testing of memory leaks, buffer overflows and underflows.
|
|
|
|
|
|
|
|
Also, CMocka tries to avoid the use of some of the newer features of C
|
|
|
|
compilers.
|
|
|
|
|
2013-01-14 11:49:38 +01:00
|
|
|
%package -n libcmocka-devel
|
|
|
|
Summary: Development headers for the cmocka library
|
2013-01-14 11:50:31 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-02-17 10:18:18 +01:00
|
|
|
Requires: cmake
|
2013-01-14 11:49:38 +01:00
|
|
|
Requires: libcmocka0 = %{version}
|
2015-02-17 10:18:18 +01:00
|
|
|
Requires: pkg-config
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%description -n libcmocka-devel
|
|
|
|
Development headers for the cmocka unit testing library.
|
|
|
|
|
|
|
|
%prep
|
2018-08-29 17:16:02 +02:00
|
|
|
%autosetup -p1
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%build
|
2019-04-24 13:38:12 +02:00
|
|
|
%define _lto_cflags %{nil}
|
2015-07-15 10:33:23 +02:00
|
|
|
%cmake \
|
2015-07-15 10:37:28 +02:00
|
|
|
-DCMAKE_SKIP_RPATH=OFF \
|
2015-07-15 10:33:23 +02:00
|
|
|
-DWITH_STATIC_LIB=ON \
|
|
|
|
-DWITH_CMOCKERY_SUPPORT=ON \
|
|
|
|
-DUNIT_TESTING=ON
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
2018-08-30 12:15:20 +02:00
|
|
|
%if %{with docs}
|
2018-08-29 18:03:31 +02:00
|
|
|
make docs
|
2023-02-17 15:11:52 +01:00
|
|
|
#endif with docs
|
|
|
|
%endif
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%install
|
2015-07-15 10:33:23 +02:00
|
|
|
%cmake_install
|
2013-01-14 11:49:38 +01:00
|
|
|
|
2015-02-17 10:18:18 +01:00
|
|
|
%check
|
2015-07-15 10:33:23 +02:00
|
|
|
pushd build
|
2018-08-29 17:16:02 +02:00
|
|
|
ctest --output-on-failure
|
2015-02-17 10:18:18 +01:00
|
|
|
popd
|
|
|
|
|
2015-07-15 10:33:23 +02:00
|
|
|
%post -n libcmocka0 -p /sbin/ldconfig
|
2013-01-14 11:49:38 +01:00
|
|
|
|
2015-07-15 10:33:23 +02:00
|
|
|
%postun -n libcmocka0 -p /sbin/ldconfig
|
2013-01-14 11:49:38 +01:00
|
|
|
|
|
|
|
%files -n libcmocka0
|
2018-08-29 17:16:02 +02:00
|
|
|
%doc AUTHORS README.md ChangeLog
|
|
|
|
%license COPYING
|
2013-01-14 11:49:38 +01:00
|
|
|
%{_libdir}/libcmocka.so.*
|
|
|
|
|
|
|
|
%files -n libcmocka-devel
|
2018-08-30 12:15:20 +02:00
|
|
|
%if %{with docs}
|
2018-08-30 10:08:58 +02:00
|
|
|
%doc build/doc/html
|
2023-02-17 15:11:52 +01:00
|
|
|
#endif with docs
|
|
|
|
%endif
|
2013-01-14 11:49:38 +01:00
|
|
|
%{_includedir}/cmocka.h
|
2015-02-17 10:18:18 +01:00
|
|
|
%{_includedir}/cmocka_pbc.h
|
2015-07-15 10:33:23 +02:00
|
|
|
%dir %{_includedir}/cmockery
|
|
|
|
%{_includedir}/cmockery/cmockery.h
|
|
|
|
%{_includedir}/cmockery/pbc.h
|
2013-01-14 11:49:38 +01:00
|
|
|
%{_libdir}/libcmocka.so
|
2013-06-05 08:45:25 +02:00
|
|
|
%{_libdir}/pkgconfig/cmocka.pc
|
2014-09-11 17:33:28 +02:00
|
|
|
%dir %{_libdir}/cmake/cmocka
|
2023-02-17 15:11:52 +01:00
|
|
|
%{_libdir}/cmake/cmocka/cmocka-config-relwithdebinfo.cmake
|
2014-09-11 17:33:28 +02:00
|
|
|
%{_libdir}/cmake/cmocka/cmocka-config-version.cmake
|
|
|
|
%{_libdir}/cmake/cmocka/cmocka-config.cmake
|
2013-02-05 11:51:47 +01:00
|
|
|
|
2013-01-14 11:49:38 +01:00
|
|
|
%changelog
|