89 lines
2.6 KiB
RPMSpec
89 lines
2.6 KiB
RPMSpec
|
|
%global gemname rake-compiler
|
||
|
|
%global gem_name %{gemname}
|
||
|
|
%global gemdir %{gem_dir}
|
||
|
|
%global geminstdir %{gem_instdir}
|
||
|
|
%global rubyabi 1.8
|
||
|
|
%global ruby19 1
|
||
|
|
%undefine _changelog_trimtime
|
||
|
|
Summary: Rake-based Ruby C Extension task generator
|
||
|
|
Name: rubygem-%{gemname}
|
||
|
|
Version: 1.1.0
|
||
|
|
Release: 1
|
||
|
|
License: MIT
|
||
|
|
URL: http://github.com/rake-compiler/rake-compiler
|
||
|
|
Source0: https://rubygems.org/gems/%{gemname}-%{version}.gem
|
||
|
|
Requires: ruby(release)
|
||
|
|
BuildRequires: ruby(release) ruby(rubygems) >= 1.3.5 rubygem(rake) rubygem(rspec) >= 3
|
||
|
|
BuildRequires: rubygems-devel
|
||
|
|
Requires: ruby(rubygems) >= 1.3.5 rubygem(rake) >= 0.8.3
|
||
|
|
BuildArch: noarch
|
||
|
|
Provides: rubygem(%{gemname}) = %{version}-%{release}
|
||
|
|
%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
|
||
|
|
%setup -q -c -T
|
||
|
|
TOPDIR=$(pwd)
|
||
|
|
mkdir tmpunpackdir
|
||
|
|
pushd tmpunpackdir
|
||
|
|
gem unpack %{SOURCE0}
|
||
|
|
cd %{gem_name}-%{version}
|
||
|
|
find ./lib/rake -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
|
||
|
|
find . -name \*.rb -print0 | xargs --null chmod 0644
|
||
|
|
gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
|
||
|
|
gem build %{gem_name}.gemspec
|
||
|
|
mv %{gem_name}-%{version}.gem $TOPDIR
|
||
|
|
popd
|
||
|
|
rm -rf tmpunpackdir
|
||
|
|
|
||
|
|
%build
|
||
|
|
%gem_install
|
||
|
|
|
||
|
|
%install
|
||
|
|
rm -rf %{buildroot}
|
||
|
|
mkdir -p %{buildroot}%{gemdir}
|
||
|
|
cp -a .%{_prefix}/* %{buildroot}%{_prefix}/
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{geminstdir}
|
||
|
|
ruby -Ilib -S rspec spec/
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{_bindir}/rake-compiler
|
||
|
|
%dir %{geminstdir}
|
||
|
|
%doc %{geminstdir}/README.md
|
||
|
|
%doc %{geminstdir}/LICENSE.txt
|
||
|
|
%doc %{geminstdir}/History.txt
|
||
|
|
%{geminstdir}/cucumber.yml
|
||
|
|
%exclude %{geminstdir}/appveyor.yml
|
||
|
|
%{geminstdir}/bin/
|
||
|
|
%{geminstdir}/features/
|
||
|
|
%{geminstdir}/lib/
|
||
|
|
%{geminstdir}/tasks/
|
||
|
|
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
|
||
|
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%{gemdir}/doc/%{gemname}-%{version}
|
||
|
|
%exclude %{geminstdir}/Gemfile
|
||
|
|
%exclude %{geminstdir}/Rakefile
|
||
|
|
%{geminstdir}/spec/
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Nov 19 2020 caodongxia <caodongxia@huawei.com> - 1.1.0-1
|
||
|
|
- package init
|