init rubygem-regexp_property_values

This commit is contained in:
houyingchao 2021-11-29 10:06:58 +08:00
parent d878de6aa8
commit 55669b3603
3 changed files with 81 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,81 @@
%global gem_name regexp_property_values
Name: rubygem-%{gem_name}
Version: 1.0.0
Release: 1
Summary: Inspect property values supported by Ruby's regex engine
License: MIT
URL: https://github.com/jaynetics/regexp_property_values
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{gem_name}-%{version}-spec.txz
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby-devel >= 2.0.0
BuildRequires: gcc
BuildRequires: rubygem(rspec)
%description
This small library lets you see which property values are supported by the
regular expression engine of the Ruby version you are running, and what they
match.
%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 -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{gem_extdir_mri}/%{gem_name}
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}/
rm -rf %{buildroot}%{gem_instdir}/ext/
%check
pushd .%{gem_instdir}
ln -s %{_builddir}/spec .
sed -e '/^\s*require..character_set.$/ i skip' \
-i spec/regexp_property_values/value_spec.rb
sed -i '/^require..bundler./ s/^/#/g' spec/spec_helper.rb
rspec -I$(dirs +1)/%{gem_extdir_mri} spec
popd
%files
%dir %{gem_instdir}
%{gem_extdir_mri}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/regexp_property_values.gemspec
%changelog
* Mon Nov 29 2021 houyingchao<houyingchao@huawei.com> - 1.0.0-1
- Init package