74 lines
1.9 KiB
RPMSpec
74 lines
1.9 KiB
RPMSpec
|
|
%global _empty_manifest_terminate_build 0
|
||
|
|
%global gem_name faraday-patron
|
||
|
|
Name: rubygem-faraday-patron
|
||
|
|
Version: 1.0.0
|
||
|
|
Release: 1
|
||
|
|
Summary: Faraday adapter for Patron
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/lostisland/faraday-patron
|
||
|
|
Source0: https://rubygems.org/gems/faraday-patron-1.0.0.gem
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
BuildRequires: ruby
|
||
|
|
BuildRequires: ruby-devel
|
||
|
|
BuildRequires: rubygems
|
||
|
|
BuildRequires: rubygems-devel
|
||
|
|
BuildRequires: rsync
|
||
|
|
Provides: rubygem-faraday-patron
|
||
|
|
|
||
|
|
%description
|
||
|
|
Faraday adapter for Patron
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: Development documents and examples for faraday-patron
|
||
|
|
Provides: rubygem-faraday-patron-doc
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%description help
|
||
|
|
Faraday adapter for Patron
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n faraday-patron-1.0.0
|
||
|
|
gem spec %{SOURCE0} -l --ruby > faraday-patron.gemspec
|
||
|
|
|
||
|
|
%build
|
||
|
|
gem build faraday-patron.gemspec
|
||
|
|
|
||
|
|
%install
|
||
|
|
%gem_install
|
||
|
|
install -d -m 0755 .%{gem_dir}/{build_info,cache,doc,gems,extensions,specifications} %{buildroot}%{gem_dir}
|
||
|
|
install -d -m 0755 .%{gem_instdir} %{buildroot}%{gem_instdir}
|
||
|
|
cp -rf .%{gem_dir}/* %{buildroot}%{gem_dir}
|
||
|
|
|
||
|
|
if [ -d .%{_bindir} ]; then
|
||
|
|
mkdir -p %{buildroot}%{_bindir}
|
||
|
|
cp -a .%{_bindir}/* %{buildroot}%{_bindir}/
|
||
|
|
fi
|
||
|
|
if [ -d ext ]; then
|
||
|
|
mkdir -p %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
||
|
|
if [ -d .%{gem_extdir_mri}/%{gem_name} ]; then
|
||
|
|
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
||
|
|
else
|
||
|
|
cp -a .%{gem_extdir_mri}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
||
|
|
fi
|
||
|
|
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
||
|
|
rm -rf %{buildroot}%{gem_instdir}/ext/
|
||
|
|
fi
|
||
|
|
touch filelist.lst
|
||
|
|
if [ -d %{buildroot}%{_bindir} ]; then
|
||
|
|
find .%{_bindir} -type f -printf "/%h/%f\n" >> filelist.lst
|
||
|
|
fi
|
||
|
|
|
||
|
|
%files -n rubygem-faraday-patron -f filelist.lst
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%{gem_instdir}/*
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%{gem_docdir}/*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Aug 17 2021 baizhonggui <baizhonggui@huawei.com> - 1.0.0-1
|
||
|
|
- Package init
|