[httpie/el6] Only build manpages for Fedora
Ricky Elrod
codeblock at fedoraproject.org
Thu Sep 5 16:05:01 UTC 2013
commit d685a2a1252bf4d7899128460329451828c278fe
Author: Ricky Elrod <ricky at elrod.me>
Date: Thu Sep 5 12:04:48 2013 -0400
Only build manpages for Fedora
httpie.spec | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/httpie.spec b/httpie.spec
index def3007..016162d 100644
--- a/httpie.spec
+++ b/httpie.spec
@@ -4,7 +4,7 @@
Name: httpie
Version: 0.6.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A Curl-like tool for humans
Group: Applications/Internet
@@ -16,7 +16,9 @@ BuildRequires: python2-devel
# Needed so we can build the manpage with help2man without fataling.
BuildRequires: python-pygments
BuildRequires: python-requests
+%if 0%{?fedora}
BuildRequires: help2man
+%endif
Requires: python-pygments
Requires: python-requests
@@ -96,6 +98,7 @@ popd
export PYTHONPATH=%{buildroot}%{python_sitelib}
+%if 0%{?fedora}
mkdir -p %{buildroot}/%{_mandir}/man1
help2man --no-discard-stderr %{buildroot}/%{_bindir}/http > %{buildroot}/%{_mandir}/man1/http.1
@@ -104,23 +107,33 @@ help2man --no-discard-stderr %{buildroot}/%{_bindir}/http > %{buildroot}/%{_mand
help2man --no-discard-stderr %{buildroot}/%{_bindir}/python3-http > %{buildroot}/%{_mandir}/man1/python3-http.1
%endif
+%endif
+
%files
%doc LICENSE README.rst
-%{_mandir}/man1/http.1*
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-%{version}*
%{_bindir}/http
+%if 0%{?fedora}
+%{_mandir}/man1/http.1*
+%endif
%if 0%{?with_python3}
%files -n python3-httpie
%doc LICENSE README.rst
-%{_mandir}/man1/python3-http.1*
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}-%{version}*
%{_bindir}/python3-http
+%if 0%{?fedora}
+%{_mandir}/man1/python3-http.1*
+%endif
%endif
%changelog
+* Thu Sep 5 2013 Ricky Elrod <codeblock at fedoraproject.org> - 0.6.0-6
+- Only try building the manpage on Fedora, since RHEL's help2man doesn't
+ have the --no-discard-stderr flag.
+
* Thu Sep 5 2013 Ricky Elrod <codeblock at fedoraproject.org> - 0.6.0-5
- Loosen the requirement on python-pygments.
More information about the scm-commits
mailing list