# Generated from gettext-setup-0.24.gem by gem2rpm -*- rpm-spec -*- %global gem_name gettext-setup Name: rubygem-%{gem_name} Version: 0.25 Release: 2%{?dist} Summary: A gem to ease internationalization with fast_gettext License: ASL 2.0 URL: https://github.com/puppetlabs/gettext-setup-gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 1.9.2 # Additional requirements for test suite BuildRequires: %{_bindir}/msgcmp BuildRequires: %{_bindir}/git BuildRequires: rubygem(fast_gettext) >= 1.1.0 BuildRequires: rubygem(fast_gettext) < 2.0.0 BuildRequires: rubygem(gettext) >= 3.0.2 BuildRequires: rubygem(locale) BuildRequires: rubygem(rspec) >= 3.1 BuildRequires: rubygem(rspec) < 4 BuildArch: noarch %description This is a simple gem to set up i18n for Ruby projects (including Sinatra web apps) using gettext and fast gettext. This project sets the default locale to English. If the user has set a different locale in their browser preferences, and we support the user's preferred locale, strings and data formatting will be customized for that locale. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # Loosen fast_gettext pin (for older Ruby compat) to allow newer Fedora version %gemspec_remove_dep -g fast_gettext "~> 1.1.0" %gemspec_add_dep -g fast_gettext "~> 1.1" # Code coverage not required in tests sed -i "/require 'simplecov'/ s/^/#/" spec/spec_helper.rb sed -i "/SimpleCov.start/,/^end$/ s/^/#/" spec/spec_helper.rb %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.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}/ # Run the test suite %check pushd .%{gem_instdir} LANG=en_US.utf8 rspec -Ilib spec popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md %{gem_instdir}/locales %{gem_instdir}/spec %changelog * Wed May 31 2017 Dominic Cleal - 0.25-2 - Remove excess BRs, prefer naming executables instead of packages - Remove Group tags * Wed May 31 2017 Dominic Cleal - 0.25-1 - Update to 0.25, remove specs patch * Thu May 25 2017 Dominic Cleal - 0.24-1 - Initial package