Turn off GUI on EPEL7.
This commit is contained in:
parent
38aa927041
commit
da69b0aa3f
@ -1,3 +1,9 @@
|
|||||||
|
%if 0%{?fedora} > 0
|
||||||
|
%global gui 1
|
||||||
|
%else
|
||||||
|
%global gui 0
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 1.83
|
Version: 1.83
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
@ -19,10 +25,15 @@ BuildRequires: pcre-devel
|
|||||||
BuildRequires: tinyxml2-devel >= 2.1.0
|
BuildRequires: tinyxml2-devel >= 2.1.0
|
||||||
BuildRequires: docbook-style-xsl
|
BuildRequires: docbook-style-xsl
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
BuildRequires: qt5-devel
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
|
|
||||||
|
%if %{gui}
|
||||||
|
BuildRequires: qt5-devel
|
||||||
|
%else
|
||||||
|
Obsoletes: %{name}-gui < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
|
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
|
||||||
compilers and many other analysis tools it does not detect syntax
|
compilers and many other analysis tools it does not detect syntax
|
||||||
@ -30,6 +41,7 @@ errors in the code. Cppcheck primarily detects the types of bugs that
|
|||||||
the compilers normally do not detect. The goal is to detect only real
|
the compilers normally do not detect. The goal is to detect only real
|
||||||
errors in the code (i.e. have zero false positives).
|
errors in the code (i.e. have zero false positives).
|
||||||
|
|
||||||
|
%if %{gui}
|
||||||
%package gui
|
%package gui
|
||||||
Summary: Graphical user interface for cppcheck
|
Summary: Graphical user interface for cppcheck
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
@ -37,7 +49,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
This package contains the graphical user interface for cppcheck.
|
This package contains the graphical user interface for cppcheck.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -58,7 +70,7 @@ xsltproc --nonet -o man/manual.html \
|
|||||||
mkdir objdir-%{_target_platform}
|
mkdir objdir-%{_target_platform}
|
||||||
cd objdir-%{_target_platform}
|
cd objdir-%{_target_platform}
|
||||||
# Upstream doesn't support shared libraries (unversioned solib)
|
# Upstream doesn't support shared libraries (unversioned solib)
|
||||||
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck
|
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=%{gui} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck
|
||||||
# SMP make doesn't seem to work
|
# SMP make doesn't seem to work
|
||||||
make cppcheck
|
make cppcheck
|
||||||
|
|
||||||
@ -67,10 +79,12 @@ rm -rf %{buildroot}
|
|||||||
make -C objdir-%{_target_platform} DESTDIR=%{buildroot} install
|
make -C objdir-%{_target_platform} DESTDIR=%{buildroot} install
|
||||||
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
||||||
|
|
||||||
|
%if %{gui}
|
||||||
# Install desktop file
|
# Install desktop file
|
||||||
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
|
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
|
||||||
# Install logo
|
# Install logo
|
||||||
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
|
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd objdir-%{_target_platform}/bin
|
cd objdir-%{_target_platform}/bin
|
||||||
@ -82,16 +96,18 @@ cd objdir-%{_target_platform}/bin
|
|||||||
%{_bindir}/cppcheck
|
%{_bindir}/cppcheck
|
||||||
%{_mandir}/man1/cppcheck.1*
|
%{_mandir}/man1/cppcheck.1*
|
||||||
|
|
||||||
|
%if %{gui}
|
||||||
%files gui
|
%files gui
|
||||||
%{_bindir}/cppcheck-gui
|
%{_bindir}/cppcheck-gui
|
||||||
%{_datadir}/applications/cppcheck-gui.desktop
|
%{_datadir}/applications/cppcheck-gui.desktop
|
||||||
%{_datadir}/pixmaps/cppcheck-gui.png
|
%{_datadir}/pixmaps/cppcheck-gui.png
|
||||||
%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png
|
%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
|
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Apr 14 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-1
|
* Sat Apr 14 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-1
|
||||||
|
- GUI no longer available on RHEL 7 due to Qt5 dependency.
|
||||||
- Update to 1.83.
|
- Update to 1.83.
|
||||||
|
|
||||||
* Wed Feb 28 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.81-5
|
* Wed Feb 28 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.81-5
|
||||||
|
Loading…
Reference in New Issue
Block a user