diff --git a/rubygem-highline.spec b/rubygem-highline.spec index 2f2a869..0364567 100644 --- a/rubygem-highline.spec +++ b/rubygem-highline.spec @@ -3,17 +3,22 @@ Summary: HighLine is a high-level command-line IO library Name: rubygem-%{gem_name} -Version: 1.6.21 -Release: 1%{?dist} +Version: 1.6.11 +Release: 5%{?dist} Group: Development/Languages -License: GPLv2 or Ruby or BSD -URL: https://github.com/JEG2/highline +License: GPLv2+ or Ruby +URL: http://highline.rubyforge.org Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: rubygem-%{gem_name}.spec.template +Requires: ruby(release) +Requires: ruby(rubygems) +Requires: ruby BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby -BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(minitest) BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} %description A high-level IO library that provides validation, type conversion, and more @@ -44,25 +49,17 @@ cp -a .%{gem_dir}/* \ # Fix the shebang. find %{buildroot}%{gem_instdir}/{examples,lib,test}/ -type f -name '*.rb' -exec \ sed -i -e 's|/usr/local/bin/ruby|/usr/bin/ruby|' '{}' \; - -# Remove hidden files. +# Remove cvs files. find %{buildroot}%{gem_instdir}/ -type f -iname '.*' -exec rm -f '{}' \; %check -pushd .%{gem_instdir} -# Test fails without real terminal. -sed -i '/^ def test_terminal_size$/,/^ end$/ s/^/#/' test/tc_highline.rb - -# Set locales, since the test suite does some unjustified assumptions about -# encoding. -# https://github.com/JEG2/highline/issues/108 -LANG=en_US.utf8 ruby -Ilib:test test/ts_all.rb +pushd %{buildroot}%{gem_instdir} +ruby -S testrb -Ilib test/* popd %files %dir %{gem_instdir} -%exclude %{gem_instdir}/setup.rb %{gem_libdir} %exclude %{gem_cache} %{gem_spec} @@ -70,7 +67,7 @@ popd %files doc %doc %{gem_docdir} -%doc %{gem_instdir}/README.rdoc +%doc %{gem_instdir}/README %doc %{gem_instdir}/TODO %doc %{gem_instdir}/CHANGELOG %doc %{gem_instdir}/LICENSE @@ -78,20 +75,12 @@ popd %{gem_instdir}/Rakefile %{gem_instdir}/examples %{gem_instdir}/%{gem_name}.gemspec +%{gem_instdir}/setup.rb %{gem_instdir}/site %{gem_instdir}/test %exclude %{gem_instdir}/INSTALL %changelog -* Wed Jul 09 2014 Vít Ondruch - 1.6.21-1 -- Update to HighLine 1.6.21. - -* Sun Jun 08 2014 Fedora Release Engineering - 1.6.11-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Aug 04 2013 Fedora Release Engineering - 1.6.11-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - * Mon Mar 11 2013 Vít Ondruch - 1.6.11-5 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 diff --git a/rubygem-highline.spec.template b/rubygem-highline.spec.template new file mode 100644 index 0000000..80538fa --- /dev/null +++ b/rubygem-highline.spec.template @@ -0,0 +1,193 @@ +# Generated from <%= File::basename(format.gem_path) %> by gem2rpm -*- rpm-spec -*- +%global gem_name <%= spec.name %> +%global rubyabi 1.9.1 + +Summary: <%= spec.summary.gsub(/\.$/, "") %> +Name: rubygem-%{gem_name} +Version: <%= spec.version %> +Release: 2%{?dist} +Group: Development/Languages +License: <%= spec.licenses.empty? ? "GPLv2+ or Ruby" : spec.licenses.join(" and ") %> +<% if spec.homepage -%> +URL: <%= spec.homepage %> +<% end -%> +Source0: <%= download_path %>%{gem_name}-%{version}.gem +Source1: rubygem-%{gem_name}.spec.template +Requires: ruby(abi) = %{rubyabi} +<% for req in spec.required_rubygems_version -%> +Requires: ruby(rubygems) <%= req %> +<% end -%> +<%# TODO: Unfortunatelly this do not match with ruby(abi) yet -%> +<% for req in spec.required_ruby_version -%> +Requires: ruby <%= req %> +<% end -%> +<% for d in spec.runtime_dependencies -%> +<% for req in d.requirement -%> +Requires: rubygem(<%= d.name %>) <%= req %> +<% end -%> +<% end -%> +BuildRequires: ruby(abi) = %{rubyabi} +<% for req in spec.required_rubygems_version -%> +BuildRequires: rubygems-devel <%= req %> +<% end -%> +<%# TODO: Unfortunatelly this do not match with ruby(abi) yet -%> +<% for req in spec.required_ruby_version -%> +BuildRequires: ruby <%= req %> +<% end -%> +BuildRequires: rubygem(minitest) +<% if spec.extensions.empty? -%> +BuildArch: noarch +<% end -%> +Provides: rubygem(%{gem_name}) = %{version} + +%description +A high-level IO library that provides validation, type conversion, and more +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. + +<% if doc_subpackage -%> +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} +<% end # if doc_subpackage -%> + +%prep +%setup -q -c -T +mkdir -p .%{gem_dir} +<% unless spec.extensions.empty? -%> +export CONFIGURE_ARGS="--with-cflags='%{optflags}'" +<% end -%> +gem install --local --install-dir .%{gem_dir} \ +<% unless spec.executables.nil? or spec.executables.empty? -%> + --bindir .%{_bindir} \ +<% end -%> +<% unless spec.extensions.empty? -%> + -V \ +<% end -%> + --force %{SOURCE0} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +# Fix the shebang. +find %{buildroot}%{gem_instdir}/{examples,lib,test}/ -type f -name '*.rb' -exec \ + sed -i -e 's|/usr/local/bin/ruby|/usr/bin/ruby|' '{}' \; +# Remove cvs files. +find %{buildroot}%{gem_instdir}/ -type f -iname '.*' -exec rm -f '{}' \; + +<% unless spec.extensions.empty? -%> +mkdir -p %{buildroot}%{gem_extdir}/<%= spec.require_paths.first %> +# TODO: move the extensions +##mv %{buildroot}%{gem_instdir}/<%= spec.require_paths.first %>/shared_object.so %{buildroot}%{gem_extdir}/<%= spec.require_paths.first %>/ +<% end -%> +<% unless spec.executables.nil? or spec.executables.empty? -%> +mkdir -p %{buildroot}%{_bindir} +cp -a .%{_bindir}/* \ + %{buildroot}%{_bindir}/ +<% end -%> +<% unless spec.executables.empty? -%> +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x +<% end -%> +<% unless spec.extensions.empty? -%> +<%# TODO: Is it possible to delete the folder specified by the spec.extensions? -%> +# Remove the binary extension sources and build leftovers. +rm -rf %{buildroot}%{geminstdir}/ext +<% end -%> + +%check +pushd %{buildroot}%{gem_instdir} +ruby -S testrb -Ilib test/* +popd + +%files +%dir %{gem_instdir} +<% unless spec.executables.nil? or spec.executables.empty? -%> +<% for f in spec.executables -%> +%{_bindir}/<%= f %> +<% end -%> +%{gem_instdir}/bin +<% end -%> +%{gem_libdir} +<% unless spec.extensions.empty? -%> +%{gem_extdir} +<% end -%> +<% unless doc_subpackage -%> +%doc %{gem_docdir} +<% for f in spec.extra_rdoc_files -%> +%doc %{gem_instdir}/<%= f %> +<% end -%> +<% end -%> +%exclude %{gem_cache} +%{gem_spec} +%{gem_instdir}/COPYING + +<% if doc_subpackage -%> +%files doc +%doc %{gem_docdir} +<% for f in spec.extra_rdoc_files -%> +<% unless f == 'INSTALL' -%> +%doc %{gem_instdir}/<%= f %> +<% end -%> +<% end -%> +<% end # if doc_subpackage -%> +%{gem_instdir}/AUTHORS +%{gem_instdir}/Rakefile +%{gem_instdir}/examples +%{gem_instdir}/%{gem_name}.gemspec +%{gem_instdir}/setup.rb +%{gem_instdir}/site +%{gem_instdir}/test +%exclude %{gem_instdir}/INSTALL + +%changelog +* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1 +- update to upstream release <%= spec.version %> + +* Mon Feb 27 2012 Jamie Nguyen - 1.6.11-2 +- add spec template +- remove INSTALL file + +* Mon Feb 27 2012 Jamie Nguyen - 1.6.11-1 +- update to upstream release 1.6.11 + +* Wed Feb 22 2012 Jamie Nguyen - 1.5.2-1 +- update to upstream release 1.5.2 +- remove obsolete BuildRoot tag, %%clean section and %%defattr + +* Thu Feb 02 2012 Bohuslav Kabrda - 1.5.1-4 +- Rebuilt for Ruby 1.9.3. +- Introduced -doc subpackage. + +* Sat Jan 14 2012 Fedora Release Engineering - 1.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Dec 22 2009 Jeroen van Meeuwen - 1.5.1-1 +- New upstream version + +* Sun Jul 26 2009 Fedora Release Engineering - 1.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Mar 16 2009 Jeroen van Meeuwen - 1.5.0-1 +- New upstream version + +* Wed Feb 25 2009 Fedora Release Engineering - 1.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Sep 08 2008 Jeroen van Meeuwen - 1.4.0-2 +- Add ruby(abi) = 1.8 requires + +* Sun Jul 13 2008 root - 1.4.0-1 +- Initial package diff --git a/sources b/sources index 1bb5050..d2c8f56 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fc79952fb9d12957d828da76b94e4ecb highline-1.6.21.gem +878416e4943c73f7429845765fe4195d highline-1.6.11.gem