add conditional for epel6
This commit is contained in:
parent
358d5037ae
commit
fde2ae1586
19
cmake.spec
19
cmake.spec
@ -19,6 +19,13 @@
|
|||||||
%bcond_with appdata
|
%bcond_with appdata
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Sphinx-build cannot import CMakeLexer on EPEL <= 6
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
%bcond_without sphinx
|
||||||
|
%else
|
||||||
|
%bcond_with sphinx
|
||||||
|
%endif
|
||||||
|
|
||||||
# Place rpm-macros into proper location
|
# Place rpm-macros into proper location
|
||||||
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
|
|
||||||
@ -72,10 +79,10 @@ BuildRequires: expat-devel
|
|||||||
BuildRequires: jsoncpp-devel
|
BuildRequires: jsoncpp-devel
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
BuildRequires: libarchive-devel
|
BuildRequires: libarchive-devel
|
||||||
|
BuildRequires: /usr/bin/sphinx-build
|
||||||
%else
|
%else
|
||||||
BuildRequires: libarchive3-devel
|
BuildRequires: libarchive3-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: /usr/bin/sphinx-build
|
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: emacs
|
BuildRequires: emacs
|
||||||
@ -181,7 +188,7 @@ pushd build
|
|||||||
--docdir=/share/doc/%{name} --mandir=/share/man \
|
--docdir=/share/doc/%{name} --mandir=/share/man \
|
||||||
--%{?with_bootstrap:no-}system-libs \
|
--%{?with_bootstrap:no-}system-libs \
|
||||||
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
|
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
|
||||||
--sphinx-man --sphinx-html \
|
%{?with_sphinx:--sphinx-man --sphinx-html} \
|
||||||
%{?qt_gui};
|
%{?qt_gui};
|
||||||
make VERBOSE=1 %{?_smp_mflags}
|
make VERBOSE=1 %{?_smp_mflags}
|
||||||
|
|
||||||
@ -225,13 +232,17 @@ do
|
|||||||
cp -p $f ./${fname}_${dname}
|
cp -p $f ./${fname}_${dname}
|
||||||
done
|
done
|
||||||
# Cleanup pre-installed documentation
|
# Cleanup pre-installed documentation
|
||||||
|
%if 0%{?with_sphinx:1}
|
||||||
mv %{buildroot}%{_docdir}/%{name}/html .
|
mv %{buildroot}%{_docdir}/%{name}/html .
|
||||||
|
%endif
|
||||||
rm -rf %{buildroot}%{_docdir}/%{name}
|
rm -rf %{buildroot}%{_docdir}/%{name}
|
||||||
# Install documentation to _pkgdocdir
|
# Install documentation to _pkgdocdir
|
||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
|
cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
|
||||||
mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
|
mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
|
||||||
|
%if 0%{?with_sphinx:1}
|
||||||
mv html %{buildroot}%{_pkgdocdir}
|
mv html %{buildroot}%{_pkgdocdir}
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with gui}
|
%if %{with gui}
|
||||||
# Desktop file
|
# Desktop file
|
||||||
@ -316,11 +327,13 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/cpack%{?name_suffix}
|
%{_bindir}/cpack%{?name_suffix}
|
||||||
%{_bindir}/ctest%{?name_suffix}
|
%{_bindir}/ctest%{?name_suffix}
|
||||||
|
%if 0%{?with_sphinx:1}
|
||||||
%{_mandir}/man1/c%{name}.1.*
|
%{_mandir}/man1/c%{name}.1.*
|
||||||
%{_mandir}/man1/%{name}.1.*
|
%{_mandir}/man1/%{name}.1.*
|
||||||
%{_mandir}/man1/cpack%{?name_suffix}.1.*
|
%{_mandir}/man1/cpack%{?name_suffix}.1.*
|
||||||
%{_mandir}/man1/ctest%{?name_suffix}.1.*
|
%{_mandir}/man1/ctest%{?name_suffix}.1.*
|
||||||
%{_mandir}/man7/*.7.*
|
%{_mandir}/man7/*.7.*
|
||||||
|
%endif
|
||||||
%{_libdir}/%{name}/
|
%{_libdir}/%{name}/
|
||||||
|
|
||||||
|
|
||||||
@ -353,8 +366,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%{_datadir}/applications/CMake%{?name_suffix}.desktop
|
%{_datadir}/applications/CMake%{?name_suffix}.desktop
|
||||||
%{_datadir}/mime/packages/
|
%{_datadir}/mime/packages/
|
||||||
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
|
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
|
||||||
|
%if 0%{?with_sphinx:1}
|
||||||
%{_mandir}/man1/%{name}-gui.1.*
|
%{_mandir}/man1/%{name}-gui.1.*
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user