From 284c16370e7eab722e1b6de126acb7d86ab2e1f5 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Sun, 18 May 2014 15:33:50 +0300 Subject: [PATCH] Necessary modifications to really build. --- cppcheck.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cppcheck.spec b/cppcheck.spec index b81add0..0d91d99 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -9,7 +9,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: pcre-devel -BuildRequires: tinyxml2-devel +BuildRequires: tinyxml2-devel >= 2.1.0 BuildRequires: docbook-style-xsl BuildRequires: libxslt @@ -50,7 +50,14 @@ for f in *; do done %check -make TINYXML= check +# Config is not available in the system-wide directory - delete executables and recompile +find . -name \*.o -delete +CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \ + LDFLAGS="$RPM_LD_FLAGS" LIBS=-ltinyxml2 make TINYXML= \ + CFGDIR=$(pwd)/cfg \ + HAVE_RULES=yes \ + DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \ + %{?_smp_mflags} check %clean rm -rf %{buildroot}