diff --git a/hoe-3.26.0.gem b/hoe-3.26.0.gem new file mode 100644 index 0000000..97f4f11 Binary files /dev/null and b/hoe-3.26.0.gem differ diff --git a/rubygem-hoe-3.0.6-rescue-missing-Manifest.patch b/rubygem-hoe-3.0.6-rescue-missing-Manifest.patch new file mode 100644 index 0000000..915ef87 --- /dev/null +++ b/rubygem-hoe-3.0.6-rescue-missing-Manifest.patch @@ -0,0 +1,11 @@ +--- lib/hoe.rb.manifest 1970-01-01 09:00:00.000000000 +0900 ++++ lib/hoe.rb 2012-05-31 17:50:00.000000000 +0900 +@@ -424,7 +424,7 @@ + + manifest = read_manifest + +- abort [ ++ warn [ + "Manifest is missing or couldn't be read.", + "The Manifest is kind of a big deal.", + "Maybe you're using a gem packaged by a linux project.", diff --git a/rubygem-hoe-3.21.0-always-search-gem-for-psych.patch b/rubygem-hoe-3.21.0-always-search-gem-for-psych.patch new file mode 100644 index 0000000..d51d856 --- /dev/null +++ b/rubygem-hoe-3.21.0-always-search-gem-for-psych.patch @@ -0,0 +1,13 @@ +--- hoe-3.21.0/lib/hoe.rb.ruby27 2020-01-12 08:58:43.000000000 +0900 ++++ hoe-3.21.0/lib/hoe.rb 2020-01-31 12:05:45.445601471 +0900 +@@ -12,6 +12,10 @@ require "rake/testtask" + require "rbconfig" + + begin ++ gem "psych" ++rescue Gem::LoadError ++end ++begin + require "psych" + rescue LoadError + # do nothing diff --git a/rubygem-hoe.spec b/rubygem-hoe.spec new file mode 100644 index 0000000..0a2c6fd --- /dev/null +++ b/rubygem-hoe.spec @@ -0,0 +1,123 @@ +%global gem_name hoe +%undefine _changelog_trimtime + +Summary: Hoe is a simple rake/rubygems helper for project Rakefiles +Name: rubygem-%{gem_name} +Version: 3.26.0 +Release: 1 +License: MIT +URL: https://github.com/seattlerb/hoe +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Patch0: rubygem-hoe-3.0.6-rescue-missing-Manifest.patch +Patch1: rubygem-hoe-3.21.0-always-search-gem-for-psych.patch + +Requires: ruby(release) +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rake) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Hoe is a rake/rubygems helper for project Rakefiles. It helps generate +rubygems and includes a dynamic plug-in system allowing for easy +extensibility. Hoe ships with plug-ins for all your usual project +tasks including rdoc generation, testing, packaging, and deployment. +Plug-ins Provided: +* Hoe::Clean +* Hoe::Debug +* Hoe::Deps +* Hoe::Flay +* Hoe::Flog +* Hoe::Inline +* Hoe::Package +* Hoe::Publish +* Hoe::RCov +* Hoe::Signing +* Hoe::Test +See class rdoc for help. Hint: ri Hoe + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} +mv ../%{gem_name}-%{version}.gemspec . + +%patch0 -p0 +%patch1 -p1 + +# Allow RubyInline 3.8.4 +sed -i -e '/RubyInline/s|~> 3\.9|>= 3.8.4|' \ + lib/hoe/inline.rb + +# Allow rake-compiler 1.0 and above +sed -i -e '/rake-compiler/s|~> 1\.0|>= 1.0|' \ + lib/hoe/compiler.rb + +%build +gem build %{gem_name}-%{version}.gemspec +%gem_install + +pushd .%{gem_instdir} +%_fixperms . + +popd + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{_prefix}/* \ + %{buildroot}%{_prefix}/ + +chmod 0644 %{buildroot}%{gem_dir}/cache/*gem + +find %{buildroot}/%{gem_instdir}/bin -type f | xargs chmod 0755 +find %{buildroot}/%{_bindir} -type f | xargs chmod 0755 + +chmod 0755 %{buildroot}/%{gem_instdir}/template/bin/file_name.erb + +rm -f %{buildroot}%{gem_cache} +pushd %{buildroot}%{gem_instdir} +rm -rf \ + .autotest \ + Manifest.txt \ + Rakefile \ + test/ \ + %{nil} +popd + +%check +pushd .%{gem_instdir} + +# Save original Rakefile +sed -i.isolate -e \ + '/Hoe\.plugin :isolate/d' Rakefile +# Make sure that hoe currently building are loaded +export RUBYLIB=$(pwd)/lib + +unset SOURCE_DATE_EPOCH +rake test -v --trace + +mv Rakefile{.isolate,} +popd + +%files +%{_bindir}/sow +%dir %{gem_instdir}/ +%{gem_instdir}/bin/ +%{gem_instdir}/lib/ +%{gem_instdir}/template/ +%{gem_spec} +%doc %{gem_instdir}/[A-Z]* + +%files doc +%{gem_docdir} + +%changelog +* Wed Jan 18 2023 wangkai - 3.26.0-1 +- Init package