[rubygem-highline] Rebuilt for Ruby 1.9.3. Introduced -doc subpackage.

Vít Ondruch vondruch at fedoraproject.org
Thu Feb 2 08:52:11 UTC 2012


commit 65d920d5a7c56a39aa70be237af0052702387dc5
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Feb 2 09:52:04 2012 +0100

    Rebuilt for Ruby 1.9.3.
    Introduced -doc subpackage.

 rubygem-highline.spec |   82 +++++++++++++++++++++++++++++++------------------
 1 files changed, 52 insertions(+), 30 deletions(-)
---
diff --git a/rubygem-highline.spec b/rubygem-highline.spec
index c86b684..db68c7a 100644
--- a/rubygem-highline.spec
+++ b/rubygem-highline.spec
@@ -1,24 +1,22 @@
-%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname highline
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global gem_name highline
 
 Summary:        HighLine is a high-level command-line IO library
-Name:           rubygem-%{gemname}
+Name:           rubygem-%{gem_name}
 Version:        1.5.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Group:          Development/Languages
 License:        GPLv2+ or Ruby
 URL:            http://highline.rubyforge.org
-Source0:        http://rubyforge.org/frs/download.php/23791/%{gemname}-%{version}.tgz
+Source0:        http://rubyforge.org/frs/download.php/23791/%{gem_name}-%{version}.tgz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       rubygems
-Requires:       ruby(abi) = 1.8
-BuildRequires:  rubygems
-BuildRequires:  rubygem-rake
+Requires:       ruby(rubygems)
+Requires:       ruby(abi) = 1.9.1
+BuildRequires:  rubygems-devel
+BuildRequires:  rubygem(rake)
+BuildRequires:  rubygem(minitest)
 BuildRequires:  zip
 BuildArch:      noarch
-Provides:       rubygem(%{gemname}) = %{version}
+Provides:       rubygem(%{gem_name}) = %{version}
 
 %description
 A high-level IO library that provides validation, type conversion, and more
@@ -26,8 +24,17 @@ for command-line interfaces. HighLine also includes a complete menu system
 that can crank out anything from simple list selection to complete shells with
 just minutes of work.
 
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}
+
 %prep
-%setup -q -n %{gemname}-%{version}
+%setup -q -n %{gem_name}-%{version}
 # This makes the she-bang look OK...
 expr="s|/usr/local/bin/ruby|`which ruby`|"
 sed -i -e $expr `find test/ examples/ lib/ -name '*.rb'`
@@ -40,43 +47,58 @@ rake package
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-gem install --local --install-dir %{buildroot}%{gemdir} \
-            --force --rdoc pkg/%{gemname}-%{version}.gem
+mkdir -p %{buildroot}%{gem_dir}
+gem install --local --install-dir %{buildroot}%{gem_dir} \
+            --force --rdoc pkg/%{gem_name}-%{version}.gem
 
 # Remove backup files
-find %{buildroot}/%{geminstdir} -type f -name "*~" -delete
+find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete
 
 # Delete zero-length files
-find %{buildroot}/%{geminstdir} -type f -size 0c -exec rm -rvf {} \;
+find %{buildroot}/%{gem_instdir} -type f -size 0c -exec rm -rvf {} \;
 
 # Fix anything executable that does not have a shebang
-for file in `find %{buildroot}/%{geminstdir} -type f -perm /a+x`; do
+for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do
     [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
 done
 
 # Find files with a shebang that do not have executable permissions
-for file in `find %{buildroot}/%{geminstdir} -type f ! -perm /a+x -name "*.rb"`; do
+for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x -name "*.rb"`; do
     [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
 done
 
 %clean
 rm -rf %{buildroot}
 
+%check
+pushd %{buildroot}%{gem_instdir}
+testrb -Ilib test/*
+popd
+
 %files
 %defattr(-, root, root, -)
-%{gemdir}/gems/%{gemname}-%{version}/
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%doc %{geminstdir}/README
-%doc %{geminstdir}/INSTALL
-%doc %{geminstdir}/TODO
-%doc %{geminstdir}/CHANGELOG
-%doc %{geminstdir}/LICENSE
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-
+%dir %{gem_instdir}
+%{gem_instdir}/setup.rb
+%{gem_libdir}
+%{gem_cache}
+%{gem_spec}
+%doc %{gem_instdir}/LICENSE
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/README
+%doc %{gem_instdir}/INSTALL
+%doc %{gem_instdir}/TODO
+%doc %{gem_instdir}/CHANGELOG
+%{gem_instdir}/examples
+%{gem_instdir}/Rakefile
+%{gem_instdir}/test
 
 %changelog
+* Thu Feb 02 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.5.1-4
+- Rebuilt for Ruby 1.9.3.
+- Introduced -doc subpackage.
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list