cppcheck/cppcheck.spec

388 lines
13 KiB
RPMSpec
Raw Normal View History

# Gui built in all branches
2018-04-14 15:44:17 +00:00
%global gui 1
2017-10-18 14:44:12 +00:00
Name: cppcheck
2019-02-09 18:38:27 +00:00
Version: 1.87
Release: 1%{?dist}
2017-10-18 14:44:12 +00:00
Summary: Tool for static C/C++ code analysis
License: GPLv3+
URL: http://cppcheck.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
2009-04-30 05:52:27 +00:00
2015-11-05 19:18:07 +00:00
# Use system tinyxml2
2019-02-09 18:38:27 +00:00
Patch0: cppcheck-1.87-tinyxml.patch
2015-11-05 19:18:07 +00:00
# Fix location of translations
2018-09-11 16:19:41 +00:00
Patch1: cppcheck-1.84-translations.patch
# Set location of config files
2019-02-09 18:38:27 +00:00
Patch2: cppcheck-1.87-cfgdir.patch
2018-11-08 15:29:42 +00:00
# Select python2 explicitly
Patch3: cppcheck-1.85-htmlreport-python2.patch
2015-11-05 19:18:07 +00:00
2018-02-28 13:54:33 +00:00
BuildRequires: gcc-c++
2017-10-18 14:44:12 +00:00
BuildRequires: pcre-devel
BuildRequires: docbook-style-xsl
BuildRequires: libxslt
2015-11-05 19:18:07 +00:00
BuildRequires: cmake
2015-11-05 19:46:34 +00:00
BuildRequires: desktop-file-utils
BuildRequires: tinyxml2-devel >= 2.1.0
2018-12-16 14:02:18 +00:00
BuildRequires: zlib-devel
2011-02-07 12:36:52 +00:00
2018-04-14 15:44:17 +00:00
%if %{gui}
%if 0%{?rhel} == 7
# no qt5-devel metapackage!
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-linguist
%else
2018-04-14 15:44:17 +00:00
BuildRequires: qt5-devel
%endif
2018-04-14 15:44:17 +00:00
%else
Obsoletes: %{name}-gui < %{version}-%{release}
%endif
2009-04-30 05:52:27 +00:00
%description
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
compilers and many other analysis tools it does not detect syntax
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
errors in the code (i.e. have zero false positives).
2009-04-30 05:52:27 +00:00
2018-04-14 15:44:17 +00:00
%if %{gui}
2015-11-05 19:18:07 +00:00
%package gui
Summary: Graphical user interface for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gui
This package contains the graphical user interface for cppcheck.
2018-04-14 15:44:17 +00:00
%endif
2009-04-30 05:52:27 +00:00
2018-06-02 10:05:38 +00:00
%package htmlreport
Summary: HTML reporting for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
# RHEL packages aren't versioned
Requires: python-pygments
%else
Requires: python2-pygments
%endif
%description htmlreport
This package contains the Python utility for generating html reports
from xml files first generated using cppcheck.
2009-04-30 05:52:27 +00:00
%prep
%setup -q
2015-11-05 19:18:07 +00:00
%patch0 -p1 -b .tinyxml
%patch1 -p1 -b .translations
%patch2 -p1 -b .cfgdir
2018-11-08 15:29:42 +00:00
%patch3 -p1 -b .python2
# Make sure bundled tinyxml is not used
rm -r externals/tinyxml
2010-01-18 15:08:59 +00:00
2009-04-30 05:52:27 +00:00
%build
2015-11-05 19:18:07 +00:00
# Manuals
make 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.docbook
2009-04-30 05:52:27 +00:00
2015-11-05 19:18:07 +00:00
# Binaries
mkdir objdir-%{_target_platform}
cd objdir-%{_target_platform}
# Upstream doesn't support shared libraries (unversioned solib)
2018-11-08 15:08:01 +00:00
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=%{gui} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/Cppcheck
2015-11-12 01:17:57 +00:00
# SMP make doesn't seem to work
2015-11-13 18:33:32 +00:00
make cppcheck
2015-11-05 19:18:07 +00:00
2009-04-30 05:52:27 +00:00
%install
rm -rf %{buildroot}
2015-11-05 19:18:07 +00:00
make -C objdir-%{_target_platform} DESTDIR=%{buildroot} install
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
2009-04-30 05:52:27 +00:00
2018-04-14 15:44:17 +00:00
%if %{gui}
2015-11-05 19:46:34 +00:00
# Install desktop file
2017-01-31 21:02:36 +00:00
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
2015-11-05 19:46:34 +00:00
# Install logo
2017-01-31 21:02:36 +00:00
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
2018-04-14 15:44:17 +00:00
%endif
2015-11-05 19:46:34 +00:00
2018-06-02 10:05:38 +00:00
# Install htmlreport
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
%check
2015-11-13 18:33:32 +00:00
cd objdir-%{_target_platform}/bin
./testrunner -g -q
2009-04-30 05:52:27 +00:00
%files
%doc AUTHORS COPYING man/manual.html
2018-11-08 15:08:01 +00:00
%{_datadir}/Cppcheck/
2009-04-30 05:52:27 +00:00
%{_bindir}/cppcheck
%{_mandir}/man1/cppcheck.1*
2009-04-30 05:52:27 +00:00
2018-04-14 15:44:17 +00:00
%if %{gui}
2015-11-05 19:18:07 +00:00
%files gui
%{_bindir}/cppcheck-gui
2017-01-31 21:02:36 +00:00
%{_datadir}/applications/cppcheck-gui.desktop
%{_datadir}/pixmaps/cppcheck-gui.png
%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
2018-04-14 15:44:17 +00:00
%endif
2015-11-05 19:18:07 +00:00
2018-06-02 10:05:38 +00:00
%files htmlreport
%{_bindir}/cppcheck-htmlreport
2009-04-30 05:52:27 +00:00
%changelog
2019-02-09 18:38:27 +00:00
* Sat Feb 09 2019 Steve Grubb <sgrubb@redhat.com> - 1.87-1
- Update to 1.87.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.86-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2018-12-16 14:02:18 +00:00
* Sun Dec 16 2018 Steve Grubb <sgrubb@redhat.com> - 1.86-1
- Update to 1.86.
* Tue Nov 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.85-2
- Rebuild for tinyxml2 7.x
2018-11-08 15:08:01 +00:00
* Thu Nov 08 2018 Steve Grubb <sgrubb@redhat.com> - 1.85-1
- Update to 1.85.
2018-09-11 16:19:41 +00:00
* Tue Sep 11 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.84-1
- Update to 1.84.
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.83-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2018-06-02 14:04:13 +00:00
* Sat Jun 02 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-3
2018-06-02 10:05:38 +00:00
- Add htmlreport tool.
* Thu May 17 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-2
- Qt5 is available on RHEL 7 after all, re-enable gui in EPEL 7.
2018-04-14 14:49:48 +00:00
* Sat Apr 14 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-1
2018-04-14 15:44:17 +00:00
- GUI no longer available on RHEL 7 due to Qt5 dependency.
2018-04-14 14:49:48 +00:00
- Update to 1.83.
2018-02-28 13:54:33 +00:00
* Wed Feb 28 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.81-5
- Added gcc-c++ buildrequires.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.81-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jan 23 2018 Björn Esser <besser82@fedoraproject.org> - 1.81-3
- Rebuilt for tinyxml2 soname/ABI change again
* Tue Jan 23 2018 François Cami <fcami@fedoraproject.org> - 1.81-2
- Rebuilt for tinyxml2 soname/ABI change
2017-10-18 12:51:27 +00:00
* Wed Oct 18 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.81-1
- Update to 1.81.
2017-08-01 22:48:43 +00:00
* Tue Aug 01 2017 Gwyn Ciesla <limburgher@gmail.com> - 1.80-1
- 1.80
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.79-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-05-18 03:52:18 +00:00
* Wed May 17 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.79-1
- Update to 1.79.
* Sun Apr 09 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.78-1
- Make cppcheck able to find its configs once again (bug 1427788).
- Update to 1.78.
* Mon Feb 27 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.77-4
- Remove Patch2: fixed in gcc side (gcc-7.0.1-10.fc26)
(ref: bug 1423312)
* Fri Feb 17 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.77-3
- Fix FTBFS with gcc7 (bug 1423312, upstream ticket 7910)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.77-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2017-01-31 21:02:36 +00:00
* Tue Jan 31 2017 Jon Ciesla <limburgher@gmail.com> - 1.77-1
- 1.77.
2016-08-09 06:16:33 +00:00
* Mon Aug 08 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.75-1
- Update to 1.75.
2016-08-02 19:51:00 +00:00
* Tue Aug 02 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.74-2
- Re-enable tests on x86.
2016-08-01 20:01:36 +00:00
* Mon Aug 01 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.74-1
- Update to 1.74.
2016-05-22 19:15:10 +00:00
* Sun May 22 2016 Rich Mattes <richmattes@gmail.com> - 1.73-2
- Rebuild for tinyxml2-3.0.0
2016-04-10 01:30:21 +00:00
* Sat Apr 09 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.73-1
- Update to 1.73.
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.71-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2015-11-15 00:27:40 +00:00
* Sat Nov 14 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.71-1
- Update to 1.71.
* Fri Nov 13 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-4
- Link whole archive (BZ #1280242), patch by Mamoru Tasaka.
2015-11-13 18:33:32 +00:00
- Compile and run tests using CMake.
* Wed Nov 11 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-3
- Enable HAVE_RULES.
2015-11-05 19:46:34 +00:00
* Thu Nov 5 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-2
- Include GUI (BZ #1278318).
2015-09-21 22:16:18 +00:00
* Mon Sep 21 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-1
- Update to 1.70.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.68-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-02 11:09:30 +00:00
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.68-2
- Rebuilt for GCC 5 C++11 ABI change
2015-01-04 05:28:47 +00:00
* Sat Jan 03 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.68-1
- Update to 1.68.
2014-12-01 21:04:29 +00:00
* Mon Dec 01 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.67-1
- Update to 1.67.
2014-08-24 03:38:02 +00:00
* Sat Aug 23 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.66-1
- Update to 1.66.
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.65-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.65-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-12 22:32:54 +00:00
* Tue May 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.65-1
- Update to 1.65.
2014-01-22 19:36:44 +00:00
* Wed Jan 22 2014 François Cami <fcami@fedoraproject.org> - 1.63-3
- Add HAVE_RULES=yes (#1056733).
2014-01-07 17:04:51 +00:00
* Tue Jan 07 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.63-2
- Include cfg files as well.
2014-01-07 16:04:11 +00:00
* Tue Jan 07 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.63-1
- Update to 1.63.
2013-10-13 16:35:05 +00:00
* Sun Oct 13 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.62-1
- Update to 1.62.
2013-08-14 14:27:40 +00:00
* Sat Aug 10 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.61-1
- Update to 1.61.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.60.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-06-03 19:33:02 +00:00
* Mon Jun 03 2013 François Cami <fcami@fedoraproject.org> - 1.60.1-1
- Update to 1.60.1.
2013-03-31 21:15:15 +00:00
* Mon Apr 01 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.59-1
- Update to 1.59.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.58-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2013-01-13 18:11:48 +00:00
* Sun Jan 13 2013 François Cami <fcami@fedoraproject.org> - 1.58-1
- Update to 1.58.
2012-11-04 19:02:11 +00:00
* Tue Sep 18 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.57-1
- Update to 1.57.
2012-09-18 19:15:44 +00:00
* Tue Sep 18 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.56-1
- Update to 1.56.
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.55-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-07-10 10:57:51 +00:00
* Tue Jul 10 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.55-1
- Update to 1.55.
2012-04-15 10:40:57 +00:00
* Sun Apr 15 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.54-1
- Update to 1.54.
2012-02-11 11:18:30 +00:00
* Sat Feb 11 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.53-1
- Update to 1.53.
2012-01-05 10:49:45 +00:00
* Thu Jan 05 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.52-2
- Add missing includes (fix FTBFS in rawhide).
2011-12-11 12:00:19 +00:00
* Sun Dec 11 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.52-1
- Update to 1.52.
* Wed Oct 26 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.51-2
- Include man page and more other docs.
- Build with $RPM_LD_FLAGS.
- Improve summary and description.
2011-10-09 11:09:04 +00:00
* Sun Oct 09 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.51-1
- Update to 1.51.
2011-08-19 09:11:50 +00:00
* Fri Aug 19 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.50-2
- Fix build on EPEL-4.
2011-08-14 15:48:52 +00:00
* Sun Aug 14 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.50-1
- Update to 1.50.
2011-06-13 13:13:37 +00:00
* Mon Jun 13 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.49-1
- Update to 1.49.
* Sat Apr 30 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.48-2
- Build with system tinyxml and support for rules.
- Run test suite during build, don't include its sources in docs.
- Drop readme.txt from docs, it doesn't contain useful info after installed.
2011-04-15 17:25:24 +00:00
* Fri Apr 15 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.48-1
- Update to 1.48.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.47-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-02-07 10:49:51 +00:00
* Mon Feb 07 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.47-1
- Update to 1.47.
2010-12-30 12:35:00 +00:00
* Thu Dec 30 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.46.1-1
- Update to 1.46.1.
2010-12-15 10:43:04 +00:00
* Wed Dec 15 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.46-1
- Update to 1.46.
2010-10-04 10:47:04 +00:00
* Mon Oct 4 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.45-1
- Update to 1.45.
2010-07-24 11:23:10 +00:00
* Sat Jul 24 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.44-1
- Update to 1.44.
2010-05-09 12:50:20 +00:00
* Sun May 9 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.43-1
- Update to 1.43.
2010-03-10 18:07:54 +00:00
* Wed Mar 10 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.42-1
- Update to 1.42.
2010-01-18 15:08:59 +00:00
* Mon Jan 18 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.40-1
- Update to 1.40.
2009-12-27 09:59:45 +00:00
* Sun Dec 27 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.39-1
- Update to 1.39.
2009-11-07 10:15:44 +00:00
* Sat Nov 07 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.38-1
- Update to 1.38.
2009-09-22 13:24:59 +00:00
* Tue Sep 22 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.36-1
- Update to 1.36.
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-09-22 13:24:59 +00:00
* Thu Jul 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.34-1
2009-07-16 13:48:51 +00:00
- Update to 1.34.
2009-09-22 13:24:59 +00:00
* Mon Apr 27 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.31-1
2009-04-30 05:52:27 +00:00
- First release.