commit 37167bfd7eecaa35c211e3c5bf1d08292b6db876 Author: Hans Ulrich Niedermann hun@n-dimensional.de Date: Fri Apr 1 00:57:34 2011 +0200
Conditionally define use_prebuilt_docs macro
Depending on the distribution, define use_prebuilt_docs macro in a single place with a single logic.
This replaces the part where "%if 0%{?fedora}" was formerly treated as the logical negation of "%if 0%{?el4}%{?el5}%{?el6}".
erlang.spec | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) --- diff --git a/erlang.spec b/erlang.spec index f29ec17..8b2c8cd 100644 --- a/erlang.spec +++ b/erlang.spec @@ -13,6 +13,12 @@
%bcond_without doc
+%if 0%{fedora} +%define use_prebuilt_docs 0 +%else +%define use_prebuilt_docs 1 +%endif + %global n_uvr %{name}-%{upstream_ver}-%{upstream_rel_for_rpm}
Name: erlang @@ -24,7 +30,7 @@ Group: Development/Languages License: ERPL URL: http://www.erlang.org Source0: http://www.erlang.org/download/otp_src_%%7Bupstream_ver%7D%%7Bupstream_rel%7... -%if 0%{?el4}%{?el5}%{?el6} +%if %{use_prebuilt_docs} Source1: http://erlang.org/download/otp_doc_html_%%7Bupstream_ver%7D%%7Bupstream_rel%... Source2: http://erlang.org/download/otp_doc_man_%%7Bupstream_ver%7D%%7Bupstream_rel%7... %endif @@ -93,7 +99,8 @@ BuildRequires: zlib-devel BuildRequires: flex BuildRequires: m4 %if %{with doc} -%if 0%{?fedora} +%if %{use_prebuilt_docs} +%else BuildRequires: fop BuildRequires: libxslt # Required for building docs (escript) @@ -1044,7 +1051,8 @@ popd
make %if %{with doc} -%if 0%{?fedora} +%if %{use_prebuilt_docs} +%else make docs %endif %endif @@ -1083,7 +1091,7 @@ install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlan
make DESTDIR=$RPM_BUILD_ROOT install %if %{with doc} -%if 0%{?el4}%{?el5}%{?el6} +%if %{use_prebuilt_docs} # extract prebuilt docs and man-pages tar xf %{SOURCE1} -C $RPM_BUILD_ROOT%{_libdir}/erlang tar xf %{SOURCE2} -C $RPM_BUILD_ROOT%{_libdir}/erlang
scm-commits@lists.fedoraproject.org