Name: iwyu Version: 3.5 Release: 1%{?dist} Summary: C/C++ source files #include analyzer based on clang Group: Development/Languages License: NCSA URL: https://code.google.com/p/include-what-you-use/ Source0: http://include-what-you-use.com/downloads/include-what-you-use-%{version}.src.tar.gz Patch1: iwyu-link_dir.patch BuildRequires: cmake BuildRequires: clang-devel # NOTE: This should probably listed as a dependency for clang-devel but it's # not, so make it explicit here BuildRequires: llvm-devel # Some of the Clang libraries are only available statically and the use of the # static library was approved (see https://fedorahosted.org/fesco/ticket/1370 ) BuildRequires: llvm-static BuildRequires: zlib-devel %description "Include what you use" means this: for every symbol (type, function, variable, or macro) that you use in foo.cc (or foo.cpp), either foo.cc or foo.h should #include a .h file that exports the declaration of that symbol. The include-what-you-use tool is a program that can be built with the clang libraries in order to analyze #includes of source files to find include-what-you-use violations, and suggest fixes for them. %prep %setup -q -n include-what-you-use %patch1 -p1 %build mkdir build cd build %cmake -DLLVM_LIB_PATH=%{_libdir}/llvm .. make %{?_smp_mflags} %install cd build make install DESTDIR=%{buildroot} cp ../fix_includes.py %{buildroot}%{_bindir}/fix_includes cd %{buildroot}%{_bindir} ln -s include-what-you-use iwyu %check cd build PATH=$PWD:$PATH ln -s ../fix_includes.py ln -s ../fix_includes_test.py ln -s ../iwyu_test_util.py ln -s ../run_iwyu_tests.py ln -s ../tests ./run_iwyu_tests.py ./fix_includes_test.py %files %{_bindir}/include-what-you-use %{_bindir}/iwyu %{_bindir}/fix_includes %changelog * Tue Jan 27 2015 Dave Johansen - 3.5-1 - Update to 3.5.0 * Fri Apr 25 2014 Dave Johansen - 3.4-1 - Initial RPM release