54 lines
1.3 KiB
RPMSpec
54 lines
1.3 KiB
RPMSpec
%global gem_name xpath
|
|
Name: rubygem-%{gem_name}
|
|
Version: 3.1.0
|
|
Release: 1
|
|
Summary: Generate XPath expressions from Ruby
|
|
License: MIT
|
|
URL: https://github.com/teamcapybara/xpath
|
|
Source0: https://rubygems.org/gems/xpath-%{version}.gem
|
|
BuildRequires: ruby(release) rubygems-devel rubygem-rspec-core rubygem-rspec-expectations
|
|
BuildRequires: rubygem(nokogiri)
|
|
BuildArch: noarch
|
|
%description
|
|
XPath is a Ruby DSL for generating XPath expressions.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version}
|
|
|
|
%build
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
sed -i "/^require 'pry'$/ s/^/#/" spec/spec_helper.rb
|
|
rspec spec
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%doc %{gem_instdir}/README.md
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%{gem_instdir}/spec
|
|
|
|
%changelog
|
|
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 3.1.0-1
|
|
- Package init
|