Allow cvs subpackage to be toggled via --with/--without
The previous commit disabled the cvs subpackage on EL > 7. Convert to the %bcond_with(out) macro to allow the subpackage to be toggled easily via a --with/--without option at build time.
This commit is contained in:
parent
9cd8ee74c8
commit
081aa7dea3
24
git.spec
24
git.spec
@ -37,11 +37,12 @@
|
|||||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Disable cvs subpackage on EL > 7
|
# Allow cvs subpackage to be toggled via --with/--without
|
||||||
|
# Disable cvs subpackage by default on EL > 7
|
||||||
%if 0%{?rhel} > 7
|
%if 0%{?rhel} > 7
|
||||||
%global with_cvs 0
|
%bcond_with cvs
|
||||||
%else
|
%else
|
||||||
%global with_cvs 1
|
%bcond_without cvs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Hardening flags for EL-7
|
# Hardening flags for EL-7
|
||||||
@ -146,7 +147,7 @@ BuildRequires: acl
|
|||||||
BuildRequires: apr-util-bdb
|
BuildRequires: apr-util-bdb
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: bash
|
BuildRequires: bash
|
||||||
%if %{with_cvs}
|
%if %{with cvs}
|
||||||
BuildRequires: cvs
|
BuildRequires: cvs
|
||||||
BuildRequires: cvsps
|
BuildRequires: cvsps
|
||||||
%endif
|
%endif
|
||||||
@ -208,7 +209,7 @@ tools for integrating with other SCMs, install the git-all meta-package.
|
|||||||
Summary: Meta-package to pull in all git tools
|
Summary: Meta-package to pull in all git tools
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: git = %{version}-%{release}
|
Requires: git = %{version}-%{release}
|
||||||
%if %{with_cvs}
|
%if %{with cvs}
|
||||||
Requires: git-cvs = %{version}-%{release}
|
Requires: git-cvs = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
Requires: git-email = %{version}-%{release}
|
Requires: git-email = %{version}-%{release}
|
||||||
@ -253,7 +254,7 @@ Requires: git-core = %{version}-%{release}
|
|||||||
%description core-doc
|
%description core-doc
|
||||||
Documentation files for git-core package including man pages.
|
Documentation files for git-core package including man pages.
|
||||||
|
|
||||||
%if %{with_cvs}
|
%if %{with cvs}
|
||||||
%package cvs
|
%package cvs
|
||||||
Summary: Git tools for importing CVS repositories
|
Summary: Git tools for importing CVS repositories
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -397,7 +398,7 @@ install -p -m 755 %{SOURCE99} print-failed-test-output
|
|||||||
# Remove git-archimport from command list
|
# Remove git-archimport from command list
|
||||||
sed -i '/^git-archimport/d' command-list.txt
|
sed -i '/^git-archimport/d' command-list.txt
|
||||||
|
|
||||||
%if ! %{with_cvs}
|
%if ! %{with cvs}
|
||||||
# Remove git-cvs* from command list
|
# Remove git-cvs* from command list
|
||||||
sed -i '/^git-cvs/d' command-list.txt
|
sed -i '/^git-cvs/d' command-list.txt
|
||||||
%endif
|
%endif
|
||||||
@ -526,7 +527,7 @@ rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree{,.{1,html,sh,txt,xml}},t}
|
|||||||
# git-archimport is not supported
|
# git-archimport is not supported
|
||||||
find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';'
|
find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';'
|
||||||
|
|
||||||
%if ! %{with_cvs}
|
%if ! %{with cvs}
|
||||||
# Remove git-cvs* from %%{_bindir} and %%{gitexecdir}
|
# Remove git-cvs* from %%{_bindir} and %%{gitexecdir}
|
||||||
find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name 'git-cvs*' -exec rm -f {} ';'
|
find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name 'git-cvs*' -exec rm -f {} ';'
|
||||||
%endif
|
%endif
|
||||||
@ -745,12 +746,12 @@ make test || ./print-failed-test-output
|
|||||||
%exclude %{_pkgdocdir}/contrib/*/*.py[co]
|
%exclude %{_pkgdocdir}/contrib/*/*.py[co]
|
||||||
%endif
|
%endif
|
||||||
%{_pkgdocdir}/contrib/hooks
|
%{_pkgdocdir}/contrib/hooks
|
||||||
%if ! %{with_cvs}
|
%if ! %{with cvs}
|
||||||
%{?with_docs:%{_mandir}/man1/*cvs*.1*}
|
%{?with_docs:%{_mandir}/man1/*cvs*.1*}
|
||||||
%{?with_docs:%{_pkgdocdir}/git-cvs*}
|
%{?with_docs:%{_pkgdocdir}/git-cvs*}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_cvs}
|
%if %{with cvs}
|
||||||
%files cvs
|
%files cvs
|
||||||
%{_pkgdocdir}/*git-cvs*.txt
|
%{_pkgdocdir}/*git-cvs*.txt
|
||||||
%{_bindir}/git-cvsserver
|
%{_bindir}/git-cvsserver
|
||||||
@ -841,6 +842,9 @@ make test || ./print-failed-test-output
|
|||||||
%{?with_docs:%{_pkgdocdir}/*svn*.html}
|
%{?with_docs:%{_pkgdocdir}/*svn*.html}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 27 2018 Todd Zullinger <tmz@pobox.com>
|
||||||
|
- Allow cvs subpackage to be toggled via --with/--without
|
||||||
|
|
||||||
* Tue Mar 27 2018 Joe Orton <jorton@redhat.com>
|
* Tue Mar 27 2018 Joe Orton <jorton@redhat.com>
|
||||||
- Disable CVS support on EL > 7
|
- Disable CVS support on EL > 7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user