diff --git a/llvm.spec b/llvm.spec index 95dd0db..9e4513b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -77,6 +77,8 @@ Group: Development/Languages/Other Requires: %{name} = %{version} Requires: libffi-devel Requires: libstdc++-devel >= 3.4 +Obsoletes: llvm-doc < %{version} +Provides: llvm-doc = %{version} %description devel This package contains library and header files needed to develop @@ -225,11 +227,19 @@ mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/lib64 cd docs make -f Makefile.sphinx html man rm -rf %{buildroot}/usr/docs +mkdir -p %{buildroot}%{docdir}/llvm gzip _build/man/*.1 mv _build/man/* %{buildroot}/usr/share/man/man1 -mv _build/html/* %{buildroot}/usr/share/doc/packages/llvm-doc +mv _build/html/* %{buildroot}%{docdir}/llvm/ rm -rf _build +cd ../tools/clang/docs +mkdir -p %{buildroot}%{docdir}/clang/html +cp *.txt %{buildroot}%{docdir}/clang +cp *.css *.png *.html %{buildroot}%{docdir}/clang/html +cp -r analyzer %{buildroot}%{docdir}/clang +cd ../../.. + # cleanup file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d @@ -362,6 +372,7 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %{_libdir}/libLTO.a %{_libdir}/libclang*.a %{_libdir}/*profile*.so +%doc %{_docdir}/%{name} %files devel %defattr(-,root,root,-) @@ -370,10 +381,7 @@ rm %{buildroot}%{_libdir}/LLVMHello.* %{_includedir}/%{name}/ %{_includedir}/%{name}-c/ %{_libdir}/libLLVM* - -%files doc -%defattr(-,root,root,-) -%{_docdir}/%{name}-doc +%doc %{_docdir}/%{name} %files vim-plugins %defattr(-,root,root,-)