From 3d29b07197264b3eaaed4d2acfaf45b07a84e363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 29 Jan 2019 09:18:49 +0100 Subject: [PATCH] .spec file refresh. --- rubygem-listen.spec | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/rubygem-listen.spec b/rubygem-listen.spec index 04d54c0..6b06115 100644 --- a/rubygem-listen.spec +++ b/rubygem-listen.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 3.1.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Listen to file modifications License: MIT URL: https://github.com/guard/listen @@ -33,22 +33,27 @@ BuildArch: noarch Documentation for %{name}. %prep -%setup -q -c -T -%gem_install -n %{SOURCE0} +%setup -q -n %{gem_name}-%{version} -b 1 # Remove the hardcoded dependencies. We don't have them in Fedora # (except rb-inotify), they are platform specifis and not needed. # https://github.com/guard/listen/pull/54 -sed -i '/^.*.*$/ s/^/#/' .%{gem_spec} -sed -i '/def self.usable?$/a return false' .%{gem_libdir}/listen/adapter/darwin.rb +%gemspec_remove_dep -g rb-fsevent [">= 0.9.4", "~> 0.9"] +sed -i '/def self.usable?$/a return false' lib/listen/adapter/darwin.rb # Remove ruby_dep dependency. We don't need to warn about Ruby versions. -sed -i '/^.*.*$/ s/^/#/' .%{gem_spec} -sed -i '/ruby_dep/ s/^/#/' .%{gem_libdir}/listen.rb -sed -i '/RubyDep/ s/^/#/' .%{gem_libdir}/listen.rb +%gemspec_remove_dep -g ruby_dep "~> 1.2" +sed -i '/ruby_dep/ s/^/#/' lib/listen.rb +sed -i '/RubyDep/ s/^/#/' lib/listen.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 mkdir -p %{buildroot}%{gem_dir} @@ -57,7 +62,7 @@ cp -a .%{gem_dir}/* \ mkdir -p %{buildroot}%{_bindir} -cp -pa .%{_bindir}/* \ +cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x @@ -65,7 +70,7 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %check pushd .%{gem_instdir} # Move the tests into place -tar xzvf %{SOURCE1} +ln -s %{_builddir}/spec spec # We removed dependencies from other platforms so let's remove # tests as well @@ -90,6 +95,9 @@ popd %doc %{gem_instdir}/README.md %changelog +* Mon Jan 28 2019 Vít Ondruch - 3.1.5-6 +- .spec file refresh. + * Sat Jul 14 2018 Fedora Release Engineering - 3.1.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild