rubygem-pdf-core/rubygem-pdf-core.spec

68 lines
1.8 KiB
RPMSpec
Raw Normal View History

2020-08-28 15:48:11 +08:00
%global gem_name pdf-core
Name: rubygem-%{gem_name}
2023-01-17 11:37:36 +08:00
Version: 0.9.0
2020-08-28 15:48:11 +08:00
Release: 1
Summary: PDF::Core is used by Prawn to render PDF documents
License: Ruby
URL: https://github.com/prawnpdf/pdf-core
2023-01-17 11:37:36 +08:00
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/prawnpdf/pdf-core && cd pdf-core
# git checkout 0.9.0 && tar czvf pdf-core-0.9.0-specs.tgz spec
2020-08-28 15:48:11 +08:00
Source1: %{gem_name}-%{version}-specs.tgz
BuildRequires: ruby(release) rubygems-devel >= 1.3.6 ruby >= 1.9.3 rubygem(pdf-reader) => 1.2
BuildRequires: rubygem(pdf-inspector) => 1.1.0 rubygem(rspec)
BuildArch: noarch
2023-01-17 11:37:36 +08:00
2020-08-28 15:48:11 +08:00
%description
PDF::Core is used by Prawn to render PDF documents.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
cp -r %{_builddir}/spec .
sed -i -e "s/require 'bundler'//" spec/spec_helper.rb
sed -i -e 's/Bundler.setup//' spec/spec_helper.rb
rspec spec
popd
%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%license %{gem_instdir}/LICENSE
%doc %{gem_instdir}/COPYING
%doc %{gem_instdir}/GPLv2
%doc %{gem_instdir}/GPLv3
%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%{gem_instdir}/Rakefile
%{gem_instdir}/%{gem_name}.gemspec
%changelog
2023-01-17 11:37:36 +08:00
* Tue Jan 17 2023 caodongxia <caodongxia@h-partners.com> - 0.9.0-1
- update to 0.9.0
2020-08-28 15:48:11 +08:00
* Wed Aug 5 2020 wangchong <wangchong56@huawei.com> - 0.8.1-1
- package init