47c13f7046
We need to have different %setup invocations on CentOS 8 and older CentOS versions. Originally, CentOS 7 was thought to behave like CentOS 8, but the fact that it behaves like CentOS 6 was hidden by the container images building the RPMs against Git LFS 2.4.0 as part of the setup process. As a consequence, we never built the RPMs using the new versions of the spec files in master, and we never noticed that they failed in this case. Since we're no longer building RPMs against an ancient version of Git LFS as part of the setup process, adjust the Ruby RPMs to call the correct %setup invocation on CentOS 7. Note that like the code with %{?el6}, %{?el7} will expand to either 1 or nothing, so the condition will be true (nonzero) for CentOS 6 or 7 and false (zero) for 8.
60 lines
1.3 KiB
RPMSpec
60 lines
1.3 KiB
RPMSpec
#global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
%global gemdir %(IFS=: R=($(gem env gempath)); echo ${R[${#R[@]}-1]})
|
|
%define gem_name hpricot
|
|
Name: rubygem-%{gem_name}
|
|
Version: 0.8.6
|
|
Release: 1%{?dist}
|
|
Summary: a swift, liberal HTML parser with a fantastic library
|
|
|
|
Group: Applications/Programming
|
|
License: N/A
|
|
URL: https://rubygems.org/gems/%{gem_name}
|
|
Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
|
BuildRoot: %(echo %{_topdir}/BUILDROOT/%{gem_name}-%{version})
|
|
BuildRequires: gem
|
|
Requires: ruby
|
|
|
|
%description
|
|
a swift, liberal HTML parser with a fantastic library
|
|
|
|
%prep
|
|
%if 0%{?el6}%{?el7}
|
|
%setup -q -c -T
|
|
%else
|
|
%setup -q -n %{gem_name}-%{version}
|
|
%endif
|
|
%if ! 0%{?el8}
|
|
gem install -V --local --force --install-dir ./%{gemdir} %{SOURCE0}
|
|
%endif
|
|
#mv ./%{gemdir}/bin ./usr/local
|
|
|
|
%build
|
|
%if 0%{?el8}
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
%gem_install
|
|
%endif
|
|
|
|
%install
|
|
mkdir -p ${RPM_BUILD_ROOT}
|
|
cp -a ./usr ${RPM_BUILD_ROOT}/usr
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%if 0%{?el8}
|
|
%dir %{gem_instdir}
|
|
%{gem_extdir_mri}
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
/usr/share/gems
|
|
%else
|
|
%{gemdir}
|
|
%endif
|
|
|
|
%changelog
|
|
* Wed May 20 2015 Andrew Neff <andyneff@users.noreply.github.com> - 2.1.8
|
|
- Initial Spec
|