forked from pool/cppcheck
Accepting request 1062346 from home:pragmalin:branches:devel:tools
- install files from the addons/ and platforms/ directories - boo#1207806 - correct shebang fix for htmlreport/cppcheck-htmlreport OBS-URL: https://build.opensuse.org/request/show/1062346 OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=103
This commit is contained in:
parent
ff0612c200
commit
b06084542c
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 31 18:24:47 UTC 2023 - PragmaticLinux <info@pragmaticlinux.com>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user