80 lines
2.6 KiB
RPMSpec
80 lines
2.6 KiB
RPMSpec
Name: cppcheck
|
|
Version: 2.6.3
|
|
Release: 2
|
|
Summary: Tool for static C/C++ code analysis
|
|
License: GPL-3.0-or-later AND LGPL-3.0-only AND MIT
|
|
URL: http://cppcheck.wiki.sourceforge.net/
|
|
Source0: https://github.com/danmar/cppcheck/archive/refs/tags/2.6.3.tar.gz
|
|
|
|
Patch0000: cppcheck-2.2-translations.patch
|
|
Patch0001: cppcheck-1.88-htmlreport-python3.patch
|
|
Patch0002: cppcheck-2.5-disable-test-testexprengine-array7.patch
|
|
|
|
BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt cmake desktop-file-utils tinyxml2-devel >= 2.1.0
|
|
|
|
Requires: python3-pygments python3-unversioned-command
|
|
Provides: %{name}-htmlreport = %{version}-%{release}
|
|
Obsoletes: %{name}-htmlreport < %{version}-%{release}
|
|
|
|
%description
|
|
Cppcheck is a static analysis tool for C/C++ code.
|
|
Cppcheck primarily detects only real errors in the code (i.e. have zero false positives)
|
|
instead of syntax errors which C/C++ compilers and many other analysis tools detect commonly.
|
|
|
|
%package help
|
|
Summary: Documentation for cppcheck
|
|
%description help
|
|
Documentation for cppcheck
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%make_build DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
|
|
xsltproc --nonet -o man/manual.html %{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl man/manual-ja.docbook
|
|
|
|
mkdir objdir-%{_target_platform}
|
|
cd objdir-%{_target_platform}
|
|
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=0 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck
|
|
%make_build cppcheck
|
|
|
|
%install
|
|
%make_install -C objdir-%{_target_platform}
|
|
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
|
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
|
|
|
%check
|
|
cd objdir-%{_target_platform}/bin
|
|
./testrunner -g -q
|
|
|
|
%files
|
|
%doc AUTHORS COPYING
|
|
%{_datadir}/Cppcheck/
|
|
%{_bindir}/cppcheck
|
|
%{_bindir}/cppcheck-htmlreport
|
|
%exclude %{_libdir}/*
|
|
%exclude %{_usrsrc}/*
|
|
|
|
%files help
|
|
%doc man/manual.html
|
|
%{_mandir}/man1/cppcheck.1*
|
|
|
|
%changelog
|
|
* Thu Jun 13 2024 yao_xin <yao_xin001@hoperun.com> - 2.6.3-2
|
|
- License compliance rectification
|
|
|
|
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 2.6.3-1
|
|
- Upgrade to version 2.6.3
|
|
|
|
* Tue Aug 10 2021 Shenmei Tu <tushenmei@huawei.com> - 1.83-8
|
|
- bugfix-SIGSTKSZ-not-constant.patch
|
|
|
|
* Thu Mar 04 2021 maminjie <maminjie1@huawei.com> - 1.83-7
|
|
- Add requires python3-unversioned-command to resolve compatibility
|
|
|
|
* Fri Sep 11 2020 wutao <wutao61@huawei.com> - 1.83-6
|
|
- change requires to python3
|
|
|
|
* Mon Nov 18 2019 lihao <lihao129@huawei.com> - 1.83-5
|
|
- Package Init
|