Created
August 20, 2020 21:21
-
-
Save pvalena/2ae2b7f366096148fbd3053ee6520a37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- rubygem-ruby-vips/.generated.spec 2020-08-20 23:20:13.778245733 +0200 | |
+++ rubygem-ruby-vips/rubygem-ruby-vips.spec 2020-08-20 23:17:52.419534544 +0200 | |
@@ -8,19 +8,18 @@ | |
License: MIT | |
URL: http://github.com/libvips/ruby-vips | |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | |
+# Tests are not shipped with the gem, you may check them out like so: | |
+# git clone --no-checkout http://github.com/libvips/ruby-vips | |
+# cd ruby-vips && git archive -v -o ruby-vips-2.0.17-spec.txz v2.0.17 spec/ | |
+Source1: %{gem_name}-%{version}-spec.txz | |
+ | |
+Requires: vips | |
BuildRequires: ruby(release) | |
BuildRequires: rubygems-devel | |
BuildRequires: ruby | |
-# BuildRequires: rubygem(rspec) >= 3.3 | |
-# BuildRequires: rubygem(rspec) < 4 | |
-# BuildRequires: rubygem(yard) >= 0.9.11 | |
-# BuildRequires: rubygem(yard) < 0.10 | |
-# BuildRequires: rubygem(redcarpet) >= 3.3 | |
-# BuildRequires: rubygem(redcarpet) < 4 | |
-# BuildRequires: rubygem(github-markup) >= 1.4 | |
-# BuildRequires: rubygem(github-markup) < 2 | |
-# BuildRequires: rubygem(rubocop) >= 0.64 | |
-# BuildRequires: rubygem(rubocop) < 1 | |
+BuildRequires: rubygem(rspec) >= 3.3 | |
+BuildRequires: rubygem(ffi) | |
+BuildRequires: vips | |
BuildArch: noarch | |
%description | |
@@ -37,14 +36,15 @@ | |
Documentation for %{name}. | |
%prep | |
-%setup -q -n %{gem_name}-%{version} | |
+%setup -q -n %{gem_name}-%{version} -b1 | |
+ | |
+# Do not use `env` in shebangs | |
+# https://github.com/libvips/ruby-vips/pull/245 | |
+sed -i 's|/usr/bin/env ruby|/usr/bin/ruby|' example/thumb.rb | |
+sed -i 's|/usr/bin/env ruby|/usr/bin/ruby|' example/example1.rb | |
%build | |
-# Create the gem as gem install only works on a gem file | |
gem build ../%{gem_name}-%{version}.gemspec | |
- | |
-# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir | |
-# by default, so that we can move it into the buildroot in %%install | |
%gem_install | |
%install | |
@@ -52,25 +52,16 @@ | |
cp -a .%{gem_dir}/* \ | |
%{buildroot}%{gem_dir}/ | |
- | |
- | |
%check | |
pushd .%{gem_instdir} | |
-# rspec spec | |
+ln -s %{_builddir}/spec . | |
+rspec spec | |
popd | |
%files | |
%dir %{gem_instdir} | |
-%exclude %{gem_instdir}/.gitignore | |
-%exclude %{gem_instdir}/.rubocop.yml | |
-%exclude %{gem_instdir}/.rubocop_todo.yml | |
-%exclude %{gem_instdir}/.travis.yml | |
-%exclude %{gem_instdir}/.yardopts | |
+%exclude %{gem_instdir}/.* | |
%license %{gem_instdir}/LICENSE.txt | |
-%{gem_instdir}/TODO | |
-%{gem_instdir}/VERSION | |
-%{gem_instdir}/example | |
-%{gem_instdir}/install-vips.sh | |
%{gem_libdir} | |
%exclude %{gem_cache} | |
%{gem_spec} | |
@@ -81,8 +72,12 @@ | |
%{gem_instdir}/Gemfile | |
%doc %{gem_instdir}/README.md | |
%{gem_instdir}/Rakefile | |
-%{gem_instdir}/ruby-vips.gemspec | |
+%{gem_instdir}/%{gem_name}.gemspec | |
+%doc %{gem_instdir}/TODO | |
+%{gem_instdir}/VERSION | |
+%{gem_instdir}/example | |
+%{gem_instdir}/install-vips.sh | |
%changelog | |
-* Thu Aug 20 2020 Pavel Valena <pvalena@redhat.com> - 2.0.17-1 | |
+* Wed Aug 12 2020 Pavel Valena <pvalena@redhat.com> - 2.0.17-1 | |
- Initial package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment