Created
August 19, 2020 14:17
-
-
Save pvalena/eb69e5b0c0afa10412983977f0a6b319 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-19 16:14:47.201613488 +0200 | |
+++ rubygem-ruby-vips/rubygem-ruby-vips.spec 2020-08-18 23:18:26.147619347 +0200 | |
@@ -8,19 +8,17 @@ | |
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 | |
+ | |
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-devel | |
BuildArch: noarch | |
%description | |
@@ -37,14 +35,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 +51,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} | |
@@ -82,7 +72,11 @@ | |
%doc %{gem_instdir}/README.md | |
%{gem_instdir}/Rakefile | |
%{gem_instdir}/ruby-vips.gemspec | |
+%doc %{gem_instdir}/TODO | |
+%{gem_instdir}/VERSION | |
+%{gem_instdir}/example | |
+%{gem_instdir}/install-vips.sh | |
%changelog | |
-* Wed Aug 19 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