%global gem_name listen Name: rubygem-%{gem_name} Version: 3.8.0 Release: 1 Summary: Listen to file modifications License: MIT URL: https://github.com/guard/listen Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source1: https://github.com/guard/%{gem_name}/archive/v%{version}.tar.gz BuildRequires: ruby(release) rubygems-devel ruby rubygem(rb-inotify) rubygem(thor) BuildRequires: rubygem(rspec) BuildArch: noarch %description The Listen gem listens to file modifications and notifies you about the changes. Works everywhere! %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 pushd %{_builddir} ln -s %{_builddir}/%{gem_name}-%{version}/spec spec popd %gemspec_remove_dep -g rb-fsevent [">= 0.10.3", "~> 0.10"] sed -i '/def self.usable?$/a return false' lib/listen/adapter/darwin.rb %build gem build ../%{gem_name}-%{version}.gemspec %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} ln -s %{_builddir}/%{gem_name}-%{version}/spec spec mv spec/lib/listen/adapter/darwin_spec.rb{,.disabled} rspec -rspec_helper spec popd %files %dir %{gem_instdir} %{_bindir}/listen %license %{gem_instdir}/LICENSE.txt %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/README.md %changelog * Fri Jan 20 2023 wangkai - 3.8.0-1 - Upgrade to version 3.8.0 * Mon Aug 24 2020 tushenmei - 3.1.5-1 - package init