diff --git a/.gitignore b/.gitignore index e69de29..7fd7ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/listen-0.4.7-specs.tar.gz +/listen-0.4.7.gem diff --git a/listen-0.4.7-Remove-hardcoded-platform-specific-dependencies.patch b/listen-0.4.7-Remove-hardcoded-platform-specific-dependencies.patch new file mode 100644 index 0000000..42a6145 --- /dev/null +++ b/listen-0.4.7-Remove-hardcoded-platform-specific-dependencies.patch @@ -0,0 +1,23 @@ +--- a/specifications/listen-0.4.7.gemspec ++++ b/specifications/listen-0.4.7.gemspec +@@ -19,20 +19,11 @@ + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then +- s.add_runtime_dependency(%q, ["~> 0.9.1"]) +- s.add_runtime_dependency(%q, ["~> 0.8.8"]) +- s.add_runtime_dependency(%q, ["~> 0.0.5"]) + s.add_development_dependency(%q, [">= 0"]) + else +- s.add_dependency(%q, ["~> 0.9.1"]) +- s.add_dependency(%q, ["~> 0.8.8"]) +- s.add_dependency(%q, ["~> 0.0.5"]) + s.add_dependency(%q, [">= 0"]) + end + else +- s.add_dependency(%q, ["~> 0.9.1"]) +- s.add_dependency(%q, ["~> 0.8.8"]) +- s.add_dependency(%q, ["~> 0.0.5"]) + s.add_dependency(%q, [">= 0"]) + end + end diff --git a/rubygem-listen.spec b/rubygem-listen.spec new file mode 100644 index 0000000..5a64ed6 --- /dev/null +++ b/rubygem-listen.spec @@ -0,0 +1,83 @@ +# Generated from listen-0.4.7.gem by gem2rpm -*- rpm-spec -*- +%global gem_name listen +%global rubyabi 1.9.1 + +Summary: Listen to file modifications +Name: rubygem-%{gem_name} +Version: 0.4.7 +Release: 1%{?dist} +Group: Development/Languages +License: MIT +URL: https://github.com/guard/listen +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +# git clone https://github.com/guard/listen.git && cd listen +# git checkout v0.4.7 +# tar czvf listen-0.4.7-specs.tar.gz spec/ +Source1: listen-%{version}-specs.tar.gz +# 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 +Patch0: listen-%{version}-Remove-hardcoded-platform-specific-dependencies.patch +Requires: ruby(abi) = %{rubyabi} +Requires: ruby(rubygems) >= 1.3.6 +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: rubygems-devel >= 1.3.6 +BuildRequires: ruby +BuildRequires: %{_bindir}/rspec +BuildRequires: rubygem(rb-inotify) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +The Listen gem listens to file modifications and notifies you about the +changes. Works everywhere! + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +%setup -q -c -T +mkdir -p .%{gem_dir} +gem install --local --install-dir .%{gem_dir} \ + --force %{SOURCE0} + +pushd .%{gem_dir} +%patch0 -p1 +popd + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} +tar xzvf %{SOURCE1} +rspec spec +popd + + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/README.md + +%changelog +* Tue Jul 24 2012 Vít Ondruch - 0.4.7-1 +- Initial package diff --git a/sources b/sources index e69de29..3336ca7 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +f3e7965b1d354cc055834d7d910217a5 listen-0.4.7-specs.tar.gz +068e217a5d4e28690370c4f8eaa2b73e listen-0.4.7.gem