2023-11-15 15:31:36 +08:00
|
|
|
%global gem_name rake-compiler
|
2020-11-19 14:12:51 +08:00
|
|
|
%undefine _changelog_trimtime
|
|
|
|
|
Summary: Rake-based Ruby C Extension task generator
|
2023-11-15 15:31:36 +08:00
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 1.2.5
|
2020-11-19 14:12:51 +08:00
|
|
|
Release: 1
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rake-compiler/rake-compiler
|
2023-11-15 15:31:36 +08:00
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
#git clone http://github.com/rake-compiler/rake-compiler
|
|
|
|
|
#cd rake-compiler
|
|
|
|
|
#git archive -v -o rake-compiler-1.2.5-specs.tar.gz v1.2.5 spec/
|
|
|
|
|
Source1: rake-compiler-%{version}-specs.tar.gz
|
2020-11-19 14:12:51 +08:00
|
|
|
Requires: ruby(release)
|
|
|
|
|
BuildRequires: ruby(release) ruby(rubygems) >= 1.3.5 rubygem(rake) rubygem(rspec) >= 3
|
2023-11-15 15:31:36 +08:00
|
|
|
BuildRequires: rubygems-devel rubygem(cucumber) gcc ruby-devel
|
|
|
|
|
Requires: ruby(rubygems) >= 1.3.5 rubygem(rake) >= 0.8.3 rubygem(did_you_mean)
|
2020-11-19 14:12:51 +08:00
|
|
|
BuildArch: noarch
|
2023-11-15 15:31:36 +08:00
|
|
|
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
2020-11-19 14:12:51 +08:00
|
|
|
%description
|
|
|
|
|
rake-compiler aims to help Gem developers while dealing with
|
|
|
|
|
Ruby C extensions, simplifiying the code and reducing the duplication.
|
|
|
|
|
It follows *convention over configuration* and set an standarized
|
|
|
|
|
structure to build and package C extensions in your gems.
|
|
|
|
|
This is the result of expriences dealing with several Gems
|
|
|
|
|
that required native extensions across platforms and different
|
|
|
|
|
user configurations where details like portability and
|
|
|
|
|
clarity of code were lacking.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
%description doc
|
|
|
|
|
This package contains documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-11-15 15:31:36 +08:00
|
|
|
%setup -q -n %{gem_name}-%{version} -b1
|
|
|
|
|
mv ../%{gem_name}-%{version}.gemspec .
|
|
|
|
|
|
2020-11-19 14:12:51 +08:00
|
|
|
find ./lib/rake -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
|
2023-11-15 15:31:36 +08:00
|
|
|
|
2020-11-19 14:12:51 +08:00
|
|
|
find . -name \*.rb -print0 | xargs --null chmod 0644
|
2023-11-15 15:31:36 +08:00
|
|
|
|
|
|
|
|
grep -rl be_true features/ | xargs sed -i 's|be_true|be_truthy|'
|
|
|
|
|
grep -rl be_false features/ | xargs sed -i 's|be_false|be_falsey|'
|
|
|
|
|
|
|
|
|
|
sed -i tasks/bin/cross-ruby.rake \
|
|
|
|
|
-e '\@LDFLAGS=@d'
|
|
|
|
|
|
|
|
|
|
sed -i cucumber.yml -e "s|~@java|'not @java'|"
|
2020-11-19 14:12:51 +08:00
|
|
|
|
|
|
|
|
%build
|
2023-11-15 15:31:36 +08:00
|
|
|
gem build %{gem_name}-%{version}.gemspec
|
2020-11-19 14:12:51 +08:00
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
2023-11-15 15:31:36 +08:00
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
2020-11-19 14:12:51 +08:00
|
|
|
cp -a .%{_prefix}/* %{buildroot}%{_prefix}/
|
|
|
|
|
|
2023-11-15 15:31:36 +08:00
|
|
|
rm -f %{buildroot}%{gem_cache}
|
|
|
|
|
pushd %{buildroot}%{gem_instdir}
|
|
|
|
|
rm -rf \
|
|
|
|
|
Gemfile \
|
|
|
|
|
Rakefile \
|
|
|
|
|
appveyor.yml \
|
|
|
|
|
cucumber.yml \
|
|
|
|
|
features/ \
|
|
|
|
|
spec/ \
|
|
|
|
|
tasks/ \
|
|
|
|
|
tmp/ \
|
|
|
|
|
%{nil}
|
|
|
|
|
popd
|
|
|
|
|
|
2020-11-19 14:12:51 +08:00
|
|
|
%check
|
2023-11-15 15:31:36 +08:00
|
|
|
rm -rf .%{gem_instdir}/spec
|
|
|
|
|
cp -a ../spec/ .%{gem_instdir}/
|
|
|
|
|
|
|
|
|
|
pushd .%{gem_instdir}
|
2020-11-19 14:12:51 +08:00
|
|
|
ruby -Ilib -S rspec spec/
|
2023-11-15 15:31:36 +08:00
|
|
|
|
|
|
|
|
export CUCUMBER_PUBLISH_QUIET=true
|
|
|
|
|
ruby -Ilib -S cucumber
|
2020-11-19 14:12:51 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{_bindir}/rake-compiler
|
2023-11-15 15:31:36 +08:00
|
|
|
%license %{gem_instdir}/LICENSE.txt
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%doc %{gem_instdir}/History.md
|
|
|
|
|
%{gem_instdir}/bin/
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%{gem_spec}
|
2020-11-19 14:12:51 +08:00
|
|
|
|
|
|
|
|
%files doc
|
2023-11-15 15:31:36 +08:00
|
|
|
%{gem_docdir}
|
2020-11-19 14:12:51 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2023-11-15 15:31:36 +08:00
|
|
|
* Wed Nov 15 2023 liyanan <liyanan61@h-partners.com> - 1.2.5-1
|
|
|
|
|
- update to 1.2.5
|
|
|
|
|
|
2020-11-19 14:12:51 +08:00
|
|
|
* Thu Nov 19 2020 caodongxia <caodongxia@huawei.com> - 1.1.0-1
|
|
|
|
|
- package init
|