代码拉取完成,页面将自动刷新
%global gem_name pdf-reader
Name: rubygem-%{gem_name}
Version: 2.15.0
Release: 1
Summary: A library for accessing the content of PDF files
License: MIT
URL: https://github.com/yob/pdf-reader
Source0: https://rubygems.org/gems/pdf-reader-%{version}.gem
# git clone --no-checkout https://github.com/yob/pdf-reader.git
# cd pdf-reader && git archive -v -o pdf-reader-2.15.0-spec.txz v2.15.0 spec/
Source1: pdf-reader-%{version}-spec.txz
BuildRequires: ruby(release) rubygems-devel ruby >= 1.9.3 rubygem(Ascii85) rubygem(afm)
BuildRequires: rubygem(hashery) rubygem(rspec) rubygem(ruby-rc4) rubygem(ttfunk)
BuildArch: noarch
%description
The PDF::Reader library implements a PDF parser conforming as much as possible
to the PDF specification from Adobe.
%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} -b 1
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}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
chmod a+x %{buildroot}%{gem_instdir}/examples/*.rb
%check
pushd .%{gem_instdir}
ln -s %{_builddir}/spec spec
sed -i '/require.*bundler/ s/^/#/' spec/spec_helper.rb
sed -i '/Bundler.setup/ s/^/#/' spec/spec_helper.rb
rspec -r spec_helper spec
popd
%files
%dir %{gem_instdir}
%{_bindir}/pdf_*
%license %{gem_instdir}/MIT-LICENSE
%{gem_instdir}/bin
%{gem_instdir}/rbi/pdf-reader.rbi
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/TODO
%doc %{gem_instdir}/CHANGELOG
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/examples
%changelog
* Thu Nov 06 2025 Ge Wang <wang__ge@126.com> - 2.15.0-1
- Update to 2.15.0:
* remove unused config file for parlour
* Avoid infinite recursion when a PDF has a loop
in the ancestorsof a Page object
* Convert two classes from typed: true to typed: strict
* Tue Jul 5 2022 caodongxia <caodongxia@h-partners.com> - 2.4.2-1
- Update to 2.4.2
* Wed Aug 5 2020 wangchong <wangchong56@huawei.com> - 2.1.0-1
- package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。