Name: smatch Version: 1.73 Release: 1%{?dist} Summary: A static analyzer for C # License breakdown: # - Smatch itself is GPL-2.0-or-later # - Sparse is MIT # - cwchash is BSD-3-clause License: GPL-2.0-or-later AND MIT AND BSD-3-Clause URL: https://%{name}.sourceforge.net # Upstream is https://repo.or.cz/w/smatch.git, but it does not allow an easy # download of tarballs so we use an official GitHub mirror instead. Source0: https://github.com/error27/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: do-not-build-sparse-binaries.patch Patch1: fix-datadir-path.patch Patch2: use-distribution-ldflags.patch Patch3: preserve-install-timestamps.patch Patch4: add-BSD-3-license.patch BuildRequires: gcc BuildRequires: make BuildRequires: openssl-devel BuildRequires: sqlite-devel Provides: bundled(cwchash) Provides: bundled(sparse) %description Smatch is a static analysis tool for C. %prep %autosetup %build %if 0%{?rhel} %set_build_flags export CFLAGS="-std=gnu99 $CFLAGS" %endif %make_build PREFIX='%{_prefix}' %install %make_install PREFIX='%{_prefix}' %check echo "int main(void) { int a; return a; }" > test.c ./smatch test.c > out grep "test.c:1 main() error: uninitialized symbol 'a'." out %files %doc README Documentation/{arm64-detecting-tagged-addresses,smatch}.txt %license GPL-2 LICENSE %{_bindir}/smatch %{_datadir}/%{name} %changelog * Thu May 25 2023 Lukáš Zaoral - 1.73-1 - Initial import