rubygem-rubyzip/rubygem-rubyzip.spec

72 lines
1.9 KiB
RPMSpec
Raw Normal View History

2020-08-24 16:22:00 +08:00
%global gem_name rubyzip
Name: rubygem-%{gem_name}
2022-06-27 16:34:03 +08:00
Version: 2.3.2
2021-12-01 10:51:47 +08:00
Release: 1
2020-08-24 16:22:00 +08:00
Summary: A ruby module for reading and writing zip files
License: Ruby or BSD
URL: http://github.com/rubyzip/rubyzip
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# CVE-2019-16892 denial of service via crafted ZIP file.
# https://bugzilla.redhat.com/show_bug.cgi?id=1771298
# https://github.com/rubyzip/rubyzip/pull/403
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
BuildArch: noarch
%description
A ruby module for reading and writing zip files.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
2020-09-05 10:42:14 +08:00
rm -rf test/encryption_test.rb
2020-08-24 16:22:00 +08:00
popd
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
# https://github.com/rubyzip/rubyzip/pull/228
chmod a-x %{buildroot}%{gem_libdir}/zip/*.rb
rm -f %{buildroot}%{gem_instdir}/samples/write_simple.rb
%check
pushd .%{gem_instdir}
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files
%dir %{gem_instdir}
%doc %{gem_instdir}/README.md
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/TODO
%{gem_instdir}/samples
%changelog
2022-06-27 16:34:03 +08:00
* Fri Jun 24 2022 SimpleUpdate Robot <tc@openeuler.org> - 2.3.2-1
- Upgrade to version 2.3.2
2021-12-01 10:51:47 +08:00
* Wed Dec 01 2021 houyingchao <houyingchao@huawei.com> - 2.0.0-1
- Upgrade to 2.0.0 version
- Fix the compilation failed of rubygem-capybara
2020-09-05 10:42:14 +08:00
* Sat Sep 5 2020 yanan li <liyanan032@huawei.com> - 1.1.7-2
- Fix build fail
2020-08-24 16:22:00 +08:00
* Wed Aug 19 2020 xiezheng <xiezheng4@huawei.com> - 1.1.7-1
- package init