forked from pool/cppcheck
- Small packaging enhancements
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=58
This commit is contained in:
parent
5e143cf72d
commit
c4a11996ef
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 27 10:03:28 UTC 2018 - Martin Pluskal <mpluskal@suse.com>
|
||||||
|
|
||||||
|
- Small packaging enhancements
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 20 13:40:09 UTC 2018 - Christoph G <foss@grueninger.de>
|
Thu Dec 20 13:40:09 UTC 2018 - Christoph G <foss@grueninger.de>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -27,10 +27,15 @@ Source: https://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.t
|
|||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: libqt5-linguist-devel
|
||||||
BuildRequires: python3
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: python3-base
|
||||||
BuildRequires: xsltproc
|
BuildRequires: xsltproc
|
||||||
Requires: python3
|
BuildRequires: pkgconfig(Qt5Core)
|
||||||
|
BuildRequires: pkgconfig(Qt5Gui)
|
||||||
|
BuildRequires: pkgconfig(Qt5PrintSupport)
|
||||||
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
|
BuildRequires: pkgconfig(libpcre)
|
||||||
Requires: python3-Pygments
|
Requires: python3-Pygments
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -57,13 +62,6 @@ errors:
|
|||||||
%package gui
|
%package gui
|
||||||
Summary: A tool for static C/C++ code analysis
|
Summary: A tool for static C/C++ code analysis
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
BuildRequires: pkgconfig
|
|
||||||
BuildRequires: pkgconfig(Qt5Core)
|
|
||||||
BuildRequires: pkgconfig(Qt5Gui)
|
|
||||||
BuildRequires: pkgconfig(Qt5PrintSupport)
|
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
|
||||||
BuildRequires: libqt5-linguist-devel
|
|
||||||
|
|
||||||
Requires: cppcheck
|
Requires: cppcheck
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
@ -75,32 +73,36 @@ doesn't see.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%define __builddir build
|
|
||||||
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_CXX_FLAGS="-DNDEBUG %{optflags}" \
|
-DCMAKE_CXX_FLAGS="-DNDEBUG %{optflags}" \
|
||||||
-DBUILD_GUI=ON \
|
-DBUILD_GUI=ON \
|
||||||
-DBUILD_TESTS=ON \
|
-DBUILD_TESTS=ON \
|
||||||
-DHAVE_RULES=yes
|
-DHAVE_RULES=yes
|
||||||
|
|
||||||
%make_jobs
|
%make_jobs
|
||||||
|
|
||||||
# does not work with CMake, directly call provided Makefile from source directory
|
# does not work with CMake, directly call provided Makefile from source directory
|
||||||
cd ..
|
cd ..
|
||||||
make man \
|
make man \
|
||||||
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
||||||
cd build
|
|
||||||
|
# use python3 as interpreter
|
||||||
|
sed -i "s|env python|python3|g" htmlreport/cppcheck-htmlreport
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
export CXXFLAGS="%{optflags}"
|
||||||
%make_jobs check
|
%make_jobs check
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 0755 -D build/bin/cppcheck %{buildroot}%{_bindir}/cppcheck
|
install -Dpm 0755 build/bin/cppcheck \
|
||||||
install -m 0755 -D htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
%{buildroot}%{_bindir}/cppcheck
|
||||||
install -m 0755 -D build/bin/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
|
install -Dpm 0755 htmlreport/cppcheck-htmlreport \
|
||||||
install -m 0644 -D cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
%{buildroot}%{_bindir}/cppcheck-htmlreport
|
||||||
|
install -Dpm 0755 build/bin/cppcheck-gui \
|
||||||
|
%{buildroot}%{_bindir}/cppcheck-gui
|
||||||
|
install -Dpm 0644 cppcheck.1 \
|
||||||
|
%{buildroot}%{_mandir}/man1/cppcheck.1
|
||||||
install -d %{buildroot}%{_datadir}/%{name}
|
install -d %{buildroot}%{_datadir}/%{name}
|
||||||
install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
install -pm 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS
|
%doc AUTHORS
|
||||||
@ -108,7 +110,7 @@ install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
|||||||
%{_bindir}/cppcheck
|
%{_bindir}/cppcheck
|
||||||
%{_bindir}/cppcheck-htmlreport
|
%{_bindir}/cppcheck-htmlreport
|
||||||
%{_datadir}/%{name}/
|
%{_datadir}/%{name}/
|
||||||
%{_mandir}/man1/cppcheck.1*
|
%{_mandir}/man1/cppcheck.1%{?ext_man}
|
||||||
|
|
||||||
%files gui
|
%files gui
|
||||||
%{_bindir}/cppcheck-gui
|
%{_bindir}/cppcheck-gui
|
||||||
|
Loading…
Reference in New Issue
Block a user