Use prebuilt documentation on EL-5, where asciidoc is too old
This commit is contained in:
parent
f8c03bb1de
commit
c3202fdeaf
35
git.spec
35
git.spec
@ -6,6 +6,7 @@
|
|||||||
# - Use proper libcurl devel package
|
# - Use proper libcurl devel package
|
||||||
# - Patch emacs and tweak docbook spaces
|
# - Patch emacs and tweak docbook spaces
|
||||||
# - Explicitly enable ipv6 for git-daemon
|
# - Explicitly enable ipv6 for git-daemon
|
||||||
|
# - Use prebuilt documentation, asciidoc is too old
|
||||||
# - Define missing python macro
|
# - Define missing python macro
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 5
|
%if 0%{?rhel} && 0%{?rhel} <= 5
|
||||||
%global gitcoredir %{_bindir}
|
%global gitcoredir %{_bindir}
|
||||||
@ -14,6 +15,7 @@
|
|||||||
%global emacs_old 1
|
%global emacs_old 1
|
||||||
%global docbook_suppress_sp 1
|
%global docbook_suppress_sp 1
|
||||||
%global enable_ipv6 1
|
%global enable_ipv6 1
|
||||||
|
%global use_prebuilt_docs 1
|
||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
%else
|
%else
|
||||||
%global gitcoredir %{_libexecdir}/git-core
|
%global gitcoredir %{_libexecdir}/git-core
|
||||||
@ -22,6 +24,7 @@
|
|||||||
%global emacs_old 0
|
%global emacs_old 0
|
||||||
%global docbook_suppress_sp 0
|
%global docbook_suppress_sp 0
|
||||||
%global enable_ipv6 0
|
%global enable_ipv6 0
|
||||||
|
%global use_prebuilt_docs 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Build gnome-keyring git-credential helper on Fedora and RHEL >= 7
|
# Build gnome-keyring git-credential helper on Fedora and RHEL >= 7
|
||||||
@ -44,6 +47,8 @@ Source3: git.xinetd.in
|
|||||||
Source4: git.conf.httpd
|
Source4: git.conf.httpd
|
||||||
Source5: git-gui.desktop
|
Source5: git-gui.desktop
|
||||||
Source6: gitweb.conf.in
|
Source6: gitweb.conf.in
|
||||||
|
Source10: http://git-core.googlecode.com/files/%{name}-manpages-%{version}.tar.gz
|
||||||
|
Source11: http://git-core.googlecode.com/files/%{name}-htmldocs-%{version}.tar.gz
|
||||||
Patch0: git-1.5-gitweb-home-link.patch
|
Patch0: git-1.5-gitweb-home-link.patch
|
||||||
# https://bugzilla.redhat.com/490602
|
# https://bugzilla.redhat.com/490602
|
||||||
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
||||||
@ -53,11 +58,14 @@ Patch4: 0001-DESTDIR-support-in-contrib-subtree-Makefile.patch
|
|||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
|
||||||
|
BuildRequires: asciidoc >= 8.4.1
|
||||||
|
BuildRequires: xmlto
|
||||||
|
%endif
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: emacs
|
BuildRequires: emacs
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
%{!?_without_docs:BuildRequires: asciidoc >= 8.4.1, xmlto}
|
|
||||||
BuildRequires: %{libcurl_devel}
|
BuildRequires: %{libcurl_devel}
|
||||||
%if %{gnome_keyring}
|
%if %{gnome_keyring}
|
||||||
BuildRequires: libgnome-keyring-devel
|
BuildRequires: libgnome-keyring-devel
|
||||||
@ -253,6 +261,15 @@ Requires: emacs-git = %{version}-%{release}
|
|||||||
%endif
|
%endif
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
|
||||||
|
%if %{use_prebuilt_docs}
|
||||||
|
mkdir -p prebuilt_docs/{html,man}
|
||||||
|
tar xf %{SOURCE10} -C prebuilt_docs/man
|
||||||
|
tar xf %{SOURCE11} -C prebuilt_docs/html
|
||||||
|
# Remove non-html files
|
||||||
|
find prebuilt_docs/html -type f ! -name '*.html' | xargs rm
|
||||||
|
find prebuilt_docs/html -type d | xargs rmdir --ignore-fail-on-non-empty
|
||||||
|
%endif
|
||||||
|
|
||||||
# Use these same options for every invocation of 'make'.
|
# Use these same options for every invocation of 'make'.
|
||||||
# Otherwise it will rebuild in %%install due to flags changes.
|
# Otherwise it will rebuild in %%install due to flags changes.
|
||||||
cat << \EOF > config.mak
|
cat << \EOF > config.mak
|
||||||
@ -292,7 +309,10 @@ EOF
|
|||||||
chmod +x %{__perl_requires}
|
chmod +x %{__perl_requires}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} all %{!?_without_docs: doc}
|
make %{?_smp_mflags} all
|
||||||
|
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
|
||||||
|
make %{?_smp_mflags} doc
|
||||||
|
%endif
|
||||||
|
|
||||||
make -C contrib/emacs
|
make -C contrib/emacs
|
||||||
|
|
||||||
@ -307,7 +327,13 @@ sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
make %{?_smp_mflags} INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
|
make %{?_smp_mflags} INSTALLDIRS=vendor install
|
||||||
|
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
|
||||||
|
make %{?_smp_mflags} INSTALLDIRS=vendor install-doc
|
||||||
|
%else
|
||||||
|
cp -a prebuilt_docs/man/* %{buildroot}%{_mandir}
|
||||||
|
cp -a prebuilt_docs/html/* Documentation/
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{emacs_old}
|
%if %{emacs_old}
|
||||||
%global _emacs_sitelispdir %{_datadir}/emacs/site-lisp
|
%global _emacs_sitelispdir %{_datadir}/emacs/site-lisp
|
||||||
@ -331,7 +357,9 @@ make -C contrib/credential/gnome-keyring/ clean
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
make -C contrib/subtree install
|
make -C contrib/subtree install
|
||||||
|
%if ! %{use_prebuilt_docs}
|
||||||
make -C contrib/subtree install-doc
|
make -C contrib/subtree install-doc
|
||||||
|
%endif
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
|
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
|
||||||
install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
|
install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
|
||||||
@ -520,6 +548,7 @@ rm -rf %{buildroot}
|
|||||||
- Define GNU_ROFF to force ASCII apostrophes in manpages (so copy/paste works)
|
- Define GNU_ROFF to force ASCII apostrophes in manpages (so copy/paste works)
|
||||||
- Install tcsh completion (requires manual setup by users)
|
- Install tcsh completion (requires manual setup by users)
|
||||||
- Clean up dist conditionals, don't pretend to support EL-4 builds
|
- Clean up dist conditionals, don't pretend to support EL-4 builds
|
||||||
|
- Use prebuilt documentation on EL-5, where asciidoc is too old
|
||||||
|
|
||||||
* Wed Feb 20 2013 Adam Tkac <atkac redhat com> - 1.8.1.4-1
|
* Wed Feb 20 2013 Adam Tkac <atkac redhat com> - 1.8.1.4-1
|
||||||
- update to 1.8.1.4
|
- update to 1.8.1.4
|
||||||
|
Loading…
Reference in New Issue
Block a user