rubygem-afm/rubygem-afm.spec

63 lines
1.6 KiB
RPMSpec
Raw Normal View History

2020-08-18 15:05:39 +08:00
%global gem_name afm
Name: rubygem-%{gem_name}
Version: 0.2.2
Release: 1
Summary: Reading Adobe Font Metrics (afm) files
License: MIT
URL: http://github.com/halfbyte/afm
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release) rubygems-devel rubygem(minitest) rubygem(mocha)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
%description
A simple library to read afm files and use the data conveniently.
%package doc
Summary: Documentation for %{name}
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
gem build %{gem_name}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
sed -i -e '2d' ./test/helper.rb
ruby -Ilib:test -e 'Dir.glob "./test/test_*.rb", &method(:require)'
popd
%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_cache}
%exclude %{gem_instdir}/.document
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/%{gem_name}.gemspec
%doc %{gem_instdir}/LICENSE
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/VERSION
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/Rakefile
%{gem_instdir}/test
%changelog
* Sat Jul 25 2020 wangyue <wangyue92@huawei.com> - 0.2.2-1
- package init