Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Jussi Lehtola | 084b1e7d1b | |
Jussi Lehtola | fa577fc891 | |
Jussi Lehtola | d008f8ca5a | |
Jussi Lehtola | 1d57432867 | |
Jussi Lehtola | 2888fb3b05 | |
Jussi Lehtola | 61e94c5bbf |
|
@ -1,7 +1,7 @@
|
|||
Name: cppcheck
|
||||
Version: 1.47
|
||||
Release: 2%{?dist}
|
||||
Summary: A tool for static C/C++ code analysis
|
||||
Version: 1.53
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for static C/C++ code analysis
|
||||
Group: Development/Languages
|
||||
License: GPLv3+
|
||||
URL: http://cppcheck.wiki.sourceforge.net/
|
||||
|
@ -9,54 +9,86 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
|||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: tinyxml-devel
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
|
||||
%description
|
||||
This program tries to detect bugs that your C/C++ compiler don't see.
|
||||
The goal is no false positives.
|
||||
|
||||
Your compiler can detect many problems that cppcheck don't try to detect.
|
||||
We recommend that you enable as many warnings as possible in your compiler.
|
||||
|
||||
Cppcheck is versatile. You can check non-standard code that includes
|
||||
various compiler extensions, inline assembly code, etc.
|
||||
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).
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# Convert text files to UTF-8
|
||||
for file in COPYING readme.txt test/tinyxml/tinystr.cpp test/tinyxml/changes.txt; do
|
||||
iconv -f ISO-8859-15 -t utf-8 $file > $file.new && \
|
||||
touch -r $file $file.new && \
|
||||
mv $file.new $file
|
||||
done
|
||||
|
||||
# Fix end of line encodings
|
||||
for file in readme.txt test/test.vcproj test/test.vcxproj{,.filters}; do
|
||||
sed -e 's|\r||g' $file > $file.new && \
|
||||
touch -r $file $file.new && \
|
||||
mv $file.new $file
|
||||
done
|
||||
|
||||
# Fix permissions
|
||||
find -name "*.cpp" -exec chmod 644 {} \;
|
||||
find -name "*.vcproj" -exec chmod 644 {} \;
|
||||
# Make sure bundled tinyxml is not used
|
||||
rm -r externals/tinyxml
|
||||
|
||||
%build
|
||||
make CXXFLAGS="%{optflags}" %{?_smp_mflags}
|
||||
# TINYXML= prevents use of bundled tinyxml
|
||||
CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \
|
||||
LDFLAGS="$RPM_LD_FLAGS" LIBS=-ltinyxml make TINYXML= \
|
||||
DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
|
||||
%{?_smp_mflags} all man
|
||||
xsltproc --nonet -o man/manual.html \
|
||||
%{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
|
||||
man/manual.docbook
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
install -D -p -m 755 cppcheck %{buildroot}%{_bindir}/cppcheck
|
||||
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
||||
|
||||
%check
|
||||
make TINYXML= check
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING readme.txt test/
|
||||
%doc AUTHORS COPYING man/manual.html
|
||||
%{_bindir}/cppcheck
|
||||
%{_mandir}/man1/cppcheck.1*
|
||||
|
||||
%changelog
|
||||
* Sat Feb 11 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.53-1
|
||||
- Update to 1.53.
|
||||
|
||||
* Thu Jan 05 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.52-2
|
||||
- Add missing includes (fix FTBFS in rawhide).
|
||||
|
||||
* 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.
|
||||
|
||||
* Sun Oct 09 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.51-1
|
||||
- Update to 1.51.
|
||||
|
||||
* Fri Aug 19 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.50-2
|
||||
- Fix build on EPEL-4.
|
||||
|
||||
* Sun Aug 14 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.50-1
|
||||
- Update to 1.50.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue