# Generated from image_optim-0.31.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name image_optim Name: rubygem-%{gem_name} Version: 0.31.1 Release: 1%{?dist} Summary: Command line tool and ruby interface to optimize (lossless compress, optionally lossy) jpeg, png, gif and svg images using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan, jpegtran, optipng, oxipng, pngcrush, pngout, pngquant, svgo) License: MIT URL: https://github.com/toy/image_optim Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 1.9.3 # BuildRequires: rubygem(image_optim_pack) >= 0.2 # BuildRequires: rubygem(image_optim_pack) < 1 # BuildRequires: rubygem(image_optim_pack) >= 0.2.2 # BuildRequires: rubygem(rspec) >= 3.0 # BuildRequires: rubygem(rspec) < 4 # BuildRequires: rubygem(rubocop) >= 1.0 # BuildRequires: rubygem(rubocop) < 2 # BuildRequires: rubygem(rubocop-rspec) >= 2.0 # BuildRequires: rubygem(rubocop-rspec) < 3 BuildArch: noarch %description Command line tool and ruby interface to optimize (lossless compress, optionally lossy) jpeg, png, gif and svg images using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan, jpegtran, optipng, oxipng, pngcrush, pngout, pngquant, svgo). %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %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 mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %check pushd .%{gem_instdir} # rspec spec popd %files %dir %{gem_instdir} %{_bindir}/image_optim %{gem_instdir}/.github %exclude %{gem_instdir}/.gitignore %{gem_instdir}/.pre-commit-hooks.yaml %exclude %{gem_instdir}/.rubocop.yml %license %{gem_instdir}/LICENSE.txt %{gem_instdir}/bin %{gem_libdir} %{gem_instdir}/script %{gem_instdir}/vendor %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.markdown %doc %{gem_instdir}/CONTRIBUTING.markdown %{gem_instdir}/Gemfile %doc %{gem_instdir}/README.markdown %{gem_instdir}/Vagrantfile %{gem_instdir}/image_optim.gemspec %{gem_instdir}/spec %changelog * Wed Oct 20 2021 mockbuilder - 0.31.1-1 - Initial package