diff --git a/cppcheck.changes b/cppcheck.changes index ea60828..a9faf18 100644 --- a/cppcheck.changes +++ b/cppcheck.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 31 18:24:47 UTC 2023 - PragmaticLinux + +- install files from the addons/ and platforms/ directories - boo#1207806 +- correct shebang fix for htmlreport/cppcheck-htmlreport + ------------------------------------------------------------------- Mon Jan 30 12:07:50 UTC 2023 - Dirk Müller diff --git a/cppcheck.spec b/cppcheck.spec index 34e6439..eb5a4be 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -25,6 +25,7 @@ URL: https://github.com/danmar/cppcheck Source: https://github.com/danmar/cppcheck/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: docbook-xsl-stylesheets +BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libqt5-linguist-devel BuildRequires: pkgconfig @@ -91,7 +92,7 @@ cd .. DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl # use python3 as interpreter -sed -i "s|env python|python3|g" htmlreport/cppcheck-htmlreport +sed -i "s|env python3|python3|g" htmlreport/cppcheck-htmlreport %check export CXXFLAGS="%{optflags}" @@ -108,6 +109,16 @@ install -Dpm 0644 cppcheck.1 \ %{buildroot}%{_mandir}/man1/cppcheck.1 install -d %{buildroot}%{_datadir}/%{name}/cfg install -pm 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}/cfg +install -d %{buildroot}%{_datadir}/%{name}/platforms +install -pm 0644 platforms/*.xml %{buildroot}%{_datadir}/%{name}/platforms +install -d %{buildroot}%{_datadir}/%{name}/addons +install -pm 0644 addons/*.py %{buildroot}%{_datadir}/%{name}/addons +# Give execute permission to python addons with a shebang to fix non-executable-script +find %{buildroot}%{_datadir}/%{name}/addons -type f -size +0 -exec awk 'NR == 1 && /^#!.*python/ { exit } { exit 1 }' {} \; -print0 | xargs -0 chmod +x +# Correct shebang to fix env-script-interpreter +find %{buildroot}%{_datadir}/%{name}/addons -type f -size +0 -exec awk 'NR == 1 && /^#!.*python/ { exit } { exit 1 }' {} \; -print0 | xargs -0 sed -i "s|env python3|python3|g" +# Remove duplicate files +%fdupes -s %{buildroot}%{_datadir}/%{name}/platforms %files %doc AUTHORS