SPECS: ruby-fastri.spec - up to 0.3.1, updated %files - docs bcond added - ...

twittner twittner at pld-linux.org
Wed Oct 1 16:07:34 CEST 2008


Author: twittner                     Date: Wed Oct  1 14:07:34 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- up to 0.3.1, updated %files
- docs bcond added
- use vendor dirs
- gem version of fastri is much slower according to note printed
  after `gem install fastri' (and my tests)
- requires ruby with patched /usr/lib/ruby/1.8/rdoc/ri/ri_paths.rb file
  (with missing `require 'rubygems/version')

---- Files affected:
SPECS:
   ruby-fastri.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/ruby-fastri.spec
diff -u SPECS/ruby-fastri.spec:1.2 SPECS/ruby-fastri.spec:1.3
--- SPECS/ruby-fastri.spec:1.2	Thu Mar  8 11:26:00 2007
+++ SPECS/ruby-fastri.spec	Wed Oct  1 16:07:28 2008
@@ -1,15 +1,20 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	docs # don't generate & install documentation (most timeconsuming)
+%define		_name	fastri
 Summary:	Fast Ruby documentation browser
 Summary(pl.UTF-8):	Szybka przeglądarka dokumentacji Ruby
-Name:		ruby-fastri
-Version:	0.2.1
+Name:		ruby-%{_name}
+Version:	0.3.1
 Release:	1
-License:	GPL
+License:	GPL v2
 Group:		Development/Languages
-Source0:	http://rubyforge.org/frs/download.php/14948/fastri-%{version}.tar.gz
-# Source0-md5:	059a6f1c9b3b6dd805b2b650dc1bd73b
+Source0:	http://eigenclass.org/static/fastri/%{_name}-%{version}.tar.gz	
+# Source0-md5:	3a7d0a64b1c8e230a34ef7b4bad30dbe
 URL:		http://eigenclass.org/hiki.rb?fastri
 %{?ruby_mod_ver_requires_eq}
+Requires:	ruby-modules >= 1:1.8.7-3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -29,35 +34,45 @@
 przez określony gem.
 
 %prep
-%setup -q -n fastri-%{version}
+%setup -q -n %{_name}-%{version}
 
 %build
-
-ruby setup.rb config \
-	--site-ruby=%{ruby_rubylibdir} \
-	--so-dir=%{ruby_archdir}
+%{__ruby} setup.rb config \
+	--site-ruby=%{ruby_vendorlibdir} \
+	--so-dir=%{ruby_vendorarchdir}
 ruby setup.rb setup
 
+%if %{with docs}
 rdoc --ri -o ri lib
 rdoc -o rdoc lib
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{ruby_archdir}
-install -d $RPM_BUILD_ROOT%{ruby_ridir}
 
 ruby setup.rb install \
 	--prefix=$RPM_BUILD_ROOT
 
+%if %{with docs}
+#install -d $RPM_BUILD_ROOT%{ruby_ridir} <- now it points to `/usr/share/ri/1.8/system', should to /usr/share/ri/1.8
+install -d $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/site # should be `vendor' instead of `site'? ri/fastri supports looking into `vendor' subdir? 
+rm -f {ri,rdoc}/created.rid
+cp -fR ri/* $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/site
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
+%doc CHANGES README.en THANKS %{?with_docs:rdoc/*}
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/fastri-server
 %attr(755,root,root) %{_bindir}/fri
+%attr(755,root,root) %{_bindir}/qri
 %attr(755,root,root) %{_bindir}/ri-emacs
-%{ruby_rubylibdir}/fastri
+%{ruby_vendorlibdir}/fastri
+%dir %{?with_docs:%{_datadir}/ri/%{ruby_version}/site}
+%{?with_docs:%{_datadir}/ri/%{ruby_version}/site/*}
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -65,7 +80,16 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
-Revision 1.2  2007/03/08 10:26:00  beorn
+Revision 1.3  2008/10/01 14:07:28  twittner
+- up to 0.3.1, updated %files
+- docs bcond added
+- use vendor dirs
+- gem version of fastri is much slower according to note printed
+  after `gem install fastri' (and my tests)
+- requires ruby with patched /usr/lib/ruby/1.8/rdoc/ri/ri_paths.rb file
+  (with missing `require 'rubygems/version')
+
+Revision 1.2  2007-03-08 10:26:00  beorn
 - Polish "Summary" translation
 - Description update and translation to polish
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ruby-fastri.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list