[packages/ruby-nokogiri] noarch rdoc/ri; add doc bcond
glen
glen at pld-linux.org
Sun Mar 20 13:50:36 CET 2016
commit bcd96893edd22096ded70b9e49a94039731709fc
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Mar 20 14:50:27 2016 +0200
noarch rdoc/ri; add doc bcond
ruby-nokogiri.spec | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ruby-nokogiri.spec b/ruby-nokogiri.spec
index f52ca53..94024ca 100644
--- a/ruby-nokogiri.spec
+++ b/ruby-nokogiri.spec
@@ -1,6 +1,7 @@
#
# Conditional build:
%bcond_without tests # build without tests
+%bcond_without doc # don't build ri/rdoc
# NOTE
# - changelog https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.rdoc
@@ -9,7 +10,7 @@
Summary: An HTML, XML, SAX, and Reader parser
Name: ruby-%{pkgname}
Version: 1.6.5
-Release: 5
+Release: 6
License: MIT
Group: Development/Languages
Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
@@ -45,6 +46,9 @@ Summary: HTML documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
Group: Documentation
Requires: ruby >= 1:1.8.7-4
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description rdoc
HTML documentation for %{pkgname}.
@@ -57,6 +61,9 @@ Summary: ri documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname}
Group: Documentation
Requires: ruby
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description ri
ri documentation for %{pkgname}.
@@ -67,7 +74,6 @@ Dokumentacji w formacie ri dla %{pkgname}.
%prep
%setup -q -n %{pkgname}-%{version}
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
-
%patch1 -p1
cp -p %{_datadir}/setup.rb .
@@ -114,6 +120,7 @@ for f in $SKIPTEST; do
done
%endif
+%if %{with doc}
rdoc --op rdoc lib
rdoc --ri --op ri lib
rm ri/Object/Nokogiri-i.ri
@@ -121,6 +128,7 @@ rm ri/Object/cdesc-Object.ri
rm ri/lib/nokogiri/css/page-tokenizer_rex.ri
rm ri/created.rid
rm ri/cache.ri
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -129,8 +137,11 @@ install -d $RPM_BUILD_ROOT{%{ruby_archdir},%{ruby_rubylibdir},%{ruby_ridir},%{ru
--prefix=$RPM_BUILD_ROOT
cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
+
+%if %{with doc}
cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -147,6 +158,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{ruby_vendorarchdir}/nokogiri/nokogiri.so
%{ruby_specdir}/%{pkgname}-%{version}.gemspec
+%if %{with doc}
%files rdoc
%defattr(644,root,root,755)
%{ruby_rdocdir}/%{name}-%{version}
@@ -155,3 +167,4 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{ruby_ridir}/Nokogiri
%{ruby_ridir}/XSD
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-nokogiri.git/commitdiff/bcd96893edd22096ded70b9e49a94039731709fc
More information about the pld-cvs-commit
mailing list