diff options
1 files changed, 83 insertions, 0 deletions
diff --git a/SPECS/rubygem-base32.spec b/SPECS/rubygem-base32.spec
new file mode 100644
index 0000000..fd1cd68
--- /dev/null
+++ b/SPECS/rubygem-base32.spec
@@ -0,0 +1,83 @@
+%global gem_name base32
+Name: rubygem-%{gem_name}
+Version: 0.3.2
+Release: 1%{?dist}
+Summary: Ruby extension for base32 encoding and decoding
+Group: Development/Languages
+License: MIT
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby
+%if 0%{?rhel} == 7
+BuildRequires: rubygem(minitest5)
+BuildRequires: rubygem(minitest)
+BuildArch: noarch
+Ruby extension for base32 encoding and decoding.
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+%description doc
+Documentation for %{name}.
+gem unpack %{SOURCE0}
+%setup -q -D -T -n %{gem_name}-%{version}
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+# Create the gem as gem install only works on a gem file
+gem build %{gem_name}.gemspec
+# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
+# by default, so that we can move it into the buildroot in %%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+# Run the test suite
+pushd .%{gem_instdir}
+ruby -Ilib -e 'Dir.glob "./test/*_test.rb", &method(:require)'
+%dir %{gem_instdir}
+%exclude %{gem_instdir}/.gitignore
+%exclude %{gem_instdir}/.travis.yml
+%license %{gem_instdir}/LICENSE
+%exclude %{gem_cache}
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/
+%doc %{gem_instdir}/README
+* Fri Feb 03 2017 mh <> - 0.3.2-1
+- Initial package