diff --git a/rubygem-unf.spec b/rubygem-unf.spec new file mode 100644 index 0000000..889c156 --- /dev/null +++ b/rubygem-unf.spec @@ -0,0 +1,88 @@ +%global gem_name unf +%global rubyabi 1.9.1 +%undefine __brp_mangle_shebangs +Name: rubygem-%{gem_name} +Version: 0.1.4 +Release: 1 +License: BSD +Summary: Wrapper library to bring Unicode Normalization Form support to Ruby/JRuby +URL: https://github.com/knu/ruby-unf +Source0: http://rubygems.org/gems/unf-%{version}.gem +Requires: ruby(release) ruby(rubygems) rubygem(unf_ext) +BuildRequires: ruby(release) rubygems-devel rubygem(minitest) rubygem(shoulda) rubygem(unf_ext) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version}-%{release} +%description +This is a wrapper library to bring Unicode Normalization Form support +to Ruby/JRuby. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +%description doc +Documentation for %{name}. + +%prep +%setup -q -c -T +TOPDIR=$(pwd) +mkdir tmpunpackdir +pushd tmpunpackdir +gem unpack %{SOURCE0} +cd %{gem_name}-%{version} +gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec +gem build %{gem_name}.gemspec +mv %{gem_name}-%{version}.gem $TOPDIR +popd +rm -rf tmpunpackdir + +%build +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ +pushd %{buildroot}%{gem_instdir} +rm -rf \ + Gemfile \ + Rakefile \ + *.gemspec \ + .gitignore \ + .travis.yml \ + test/ \ + %{nil} +popd + +%check +pushd .%{gem_instdir} +sed -i.orig \ + -e '/begin/,/end/d' \ + -e '/bundler/d' \ + test/helper.rb +sed -i.minitest \ + -e 's|Test::Unit::TestCase|Minitest::Test|' \ + test/*.rb +cat > test/unit.rb << EOF +gem "minitest" +require "minitest/autorun" +EOF +for f in test/test_*.rb +do + ruby -Ilib:test:. $f +done +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/[A-Z]* +%{gem_libdir}/ +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} + +%changelog +* Sat Aug 8 2020 yanan li - 0.1.4-1 +- Package init diff --git a/rubygem-unf.yaml b/rubygem-unf.yaml new file mode 100644 index 0000000..065955e --- /dev/null +++ b/rubygem-unf.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/knu/ruby-unf.git +version_control: github +src_repo: knu/ruby-unf +tag_prefix: "^v" +seperator: "." diff --git a/unf-0.1.4.gem b/unf-0.1.4.gem new file mode 100644 index 0000000..01f1852 Binary files /dev/null and b/unf-0.1.4.gem differ