7f16574
%undefine _auto_set_build_flags
7f16574
a14076a
%bcond_with tests
417d22a
%bcond_with tools
a14076a
a14076a
%if %{with tests}
a14076a
%ifarch x86_64
a14076a
%global kcov_tests 1
a14076a
%endif
a14076a
%endif
a14076a
a14076a
51dd511
Name:           kcov
e3a586c
Version:        42
7de3b9f
Release:        3%{?dist}
51dd511
Summary:        Code coverage tool without special compilation options
51dd511
51dd511
# Licenses of kcov itself and its bundled js libraries (see below)
51dd511
License:        GPLv2 and BSD and MIT
51dd511
URL:            https://simonkagstrom.github.io/%{name}
51dd511
Source:         https://github.com/SimonKagstrom/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
51dd511
520e1e6
# https://github.com/SimonKagstrom/kcov/blob/v41/src/solib-parser/lib.c#L87-L104
51dd511
ExcludeArch:    s390 s390x
51dd511
51dd511
BuildRequires:  binutils-devel
51dd511
BuildRequires:  cmake
4de9a0f
BuildRequires:  coreutils
51dd511
BuildRequires:  gcc-c++
51dd511
BuildRequires:  pkgconfig(libcurl)
51dd511
BuildRequires:  pkgconfig(libdw)
51dd511
BuildRequires:  pkgconfig(libelf)
28b83cd
BuildRequires:  pkgconfig(libssl)
51dd511
BuildRequires:  pkgconfig(zlib)
4de9a0f
BuildRequires:  python3
a14076a
a14076a
%if 0%{?kcov_tests}
4de9a0f
BuildRequires:  gawk
a14076a
BuildRequires:  glibc-devel(x86-32)
4de9a0f
BuildRequires:  procps
a14076a
%endif
0c038c7
BuildRequires: make
51dd511
51dd511
# NB: Last I tried to unbundle those dependencies I hit a first roadblock in
51dd511
# the sense that all three were available in Fedora but packaged differently
51dd511
# and none of the versions matched:
51dd511
#
51dd511
# - js-jquery.noarch (compat package js-jquery2.noarch too)
51dd511
# - nodejs-handlebars.noarch
51dd511
# - xstatic-jquery-tablesorter-common.noarch
51dd511
#
51dd511
# All three packages drop files in different locations, following different
51dd511
# patterns. NodeJS modules in particular look a bit more involved.
51dd511
#
51dd511
# Since those dependencies are merely used to slightly improve static HTML
51dd511
# reports, I'd rather not spend mindless efforts unbundling things that are
51dd511
# not ultimately exposed by the package. They are embedded in the kcov(1)
51dd511
# program and written by `html-writer.cc` as static strings.
51dd511
#
51dd511
# It would make more sense to unbundle those if they were used as libraries
51dd511
# instead of just assets. Here it seems overkill. I'm registering them as
51dd511
# bundled provides even though they don't appear as individual files to at
51dd511
# least keep awareness of what I consider a non-issue.
51dd511
#
51dd511
# -- dridi
51dd511
Provides:       bundled(handlebars) = 2.2.0
51dd511
Provides:       bundled(jquery) = 2.1.1
51dd511
Provides:       bundled(jquery-tablesorter) = 2.17.1
51dd511
51dd511
51dd511
%description
51dd511
Kcov is a code coverage tester for compiled programs, Python scripts and shell
51dd511
scripts.  It allows collecting code coverage information from executables
51dd511
without special command-line arguments, and continuously produces output from
51dd511
long-running applications.
51dd511
51dd511
51dd511
%prep
5d2a39f
%autosetup -p1
51dd511
51dd511
51dd511
%build
a14076a
# NB: the test suite is not built using the %%cmake macro, on purpose.
a14076a
%if 0%{?kcov_tests}
a14076a
cmake -S tests -B build-tests -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
a14076a
%make_build -C build-tests
a14076a
%endif
a14076a
417d22a
%if %{with tools}
a14076a
cmake -S tools -B build-tools -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
a14076a
%make_build -C build-tools
417d22a
%endif
a14076a
417d22a
%cmake
417d22a
%cmake_build
51dd511
51dd511
51dd511
%install
417d22a
%cmake_install
a14076a
a14076a
a14076a
%check
a14076a
%if 0%{?kcov_tests}
a14076a
tests/tools/run-tests build/src/kcov /tmp/ build-tests/ $(pwd) -v
a14076a
%endif
51dd511
51dd511
51dd511
%files
51dd511
%license COPYING*
51dd511
%{_bindir}/*
51dd511
%{_mandir}/man1/*
6495f4c
%{_pkgdocdir}
51dd511
51dd511
51dd511
%changelog
7de3b9f
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 42-3
7de3b9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
7de3b9f
1c369d1
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 42-2
1c369d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
1c369d1
e3a586c
* Mon Aug 28 2023 Dridi Boukelmoune <dridi@fedoraproject.org> - 42-1
e3a586c
- Bump to version 42
e3a586c
79ba8a8
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 41-2
79ba8a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
79ba8a8
520e1e6
* Mon Apr 24 2023 Dridi Boukelmoune <dridi@fedoraproject.org> - 41-1
520e1e6
- Bump to version 41
520e1e6
- Remove upstream patch for GCC 13
520e1e6
520e1e6
* Fri Jan 20 2023 Dridi Boukelmoune <dridi@fedoraproject.org> - 39-6
520e1e6
- Upstream patch for GCC 13
5d2a39f
3784c48
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 39-5
3784c48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
3784c48
4236934
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 39-4
4236934
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4236934
520e1e6
* Fri Jan 28 2022 Dridi Boukelmoune <dridi@fedoraproject.org> - 39-3
417d22a
- Conditionally build the extra tools
417d22a
fcad417
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 39-2
fcad417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
fcad417
28b83cd
* Fri Nov 12 2021 Dridi Boukelmoune <dridi@fedoraproject.org> - 39-1
28b83cd
- Bump to version 39
28b83cd
- New libssl dependency
28b83cd
2ef6111
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 38-5
2ef6111
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2ef6111
12a36b2
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 38-4
12a36b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
12a36b2
79d8cf5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 38-3
79d8cf5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
79d8cf5
de408a5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 38-2
de408a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
de408a5
3ded071
* Sat Jan 18 2020 Dridi Boukelmoune <dridi@fedoraproject.org> - 38-1
3ded071
- Bump to version 38
3ded071
4de9a0f
* Tue Oct 01 2019 Dridi Boukelmoune <dridi@fedoraproject.org> - 37-1
4de9a0f
- Bump to version 37
4de9a0f
- Remove python2 workaround
4de9a0f
a14076a
* Fri Aug 09 2019 Dridi Boukelmoune <dridi@fedoraproject.org> - 36-2
a14076a
- Temporarily move python shebangs to python2
a14076a
- Build the test suite on x86_64 and run it conditionally
a14076a
- Build tools/line2addr (but don't install it)
a14076a
6495f4c
* Wed Aug 07 2019 Dridi Boukelmoune <dridi@fedoraproject.org> - 36-1
6495f4c
- Bump to version 36
6495f4c
adb0074
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 35-3
adb0074
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
adb0074
c83b01d
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 35-2
c83b01d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c83b01d
51dd511
* Wed Aug 15 2018 Dridi Boukelmoune <dridi@fedoraproject.org> - 35-1
51dd511
- Initial spec