summaryrefslogtreecommitdiffstats
path: root/SPECS/rubygem-base32.spec
diff options
context:
space:
mode:
Diffstat (limited to 'SPECS/rubygem-base32.spec')
-rw-r--r--SPECS/rubygem-base32.spec83
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
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby
+%if 0%{?rhel} == 7
+BuildRequires: rubygem(minitest5)
+%else
+BuildRequires: rubygem(minitest)
+%endif
+BuildArch: noarch
+
+%description
+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}.
+
+%prep
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+%build
+# 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
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+
+
+
+# Run the test suite
+%check
+pushd .%{gem_instdir}
+ruby -Ilib -e 'Dir.glob "./test/*_test.rb", &method(:require)'
+popd
+
+%files
+%dir %{gem_instdir}
+%exclude %{gem_instdir}/.gitignore
+%exclude %{gem_instdir}/.travis.yml
+%license %{gem_instdir}/LICENSE
+%{gem_instdir}/config
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/CHANGELOG.md
+%{gem_instdir}/Gemfile
+%doc %{gem_instdir}/README
+%{gem_instdir}/Rakefile
+%{gem_instdir}/base32.gemspec
+%{gem_instdir}/test
+
+%changelog
+* Fri Feb 03 2017 mh <mh+fedora@scrit.ch> - 0.3.2-1
+- Initial package