summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2014-11-07 08:16:57 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2014-11-07 08:16:57 -0700
commitfd5a64b6e55bc195bfe0dc9e7c7af115ad44da8c (patch)
tree8715e0c0f40cfde4e973629f4f7bb7b82a9a092f
downloadrubygem-rufus-lru-master.zip
rubygem-rufus-lru-master.tar.gz
rubygem-rufus-lru-master.tar.xz
initial package importHEADmaster
-rw-r--r--.gitignore1
-rw-r--r--rubygem-rufus-lru.spec83
-rw-r--r--sources1
3 files changed, 85 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e71f3d7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/rufus-lru-1.0.5.gem
diff --git a/rubygem-rufus-lru.spec b/rubygem-rufus-lru.spec
new file mode 100644
index 0000000..5d95b9e
--- /dev/null
+++ b/rubygem-rufus-lru.spec
@@ -0,0 +1,83 @@
+%global gem_name rufus-lru
+
+Name: rubygem-%{gem_name}
+Version: 1.0.5
+Release: 1%{?dist}
+Summary: A Hash with a max size, controlled by a LRU mechanism
+Group: Development/Languages
+License: MIT
+URL: http://github.com/jmettraux/rufus-lru
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
+Requires: ruby(release)
+Requires: ruby(rubygems)
+%endif
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(rspec) >= 2.7.0
+BuildArch: noarch
+%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
+Provides: rubygem(%{gem_name}) = %{version}
+%endif
+
+%description
+LruHash class, a Hash with a max size, controlled by a LRU mechanism.
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+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
+
+# Remove developer-only file.
+for f in Rakefile; do
+ rm $f
+ sed -i "s|\"$f\",||g" %{gem_name}.gemspec
+done
+
+%build
+gem build %{gem_name}.gemspec
+
+%gem_install
+
+# remove unnecessary gemspec
+rm .%{gem_instdir}/%{gem_name}.gemspec
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+# Run the test suite
+%check
+pushd .%{gem_instdir}
+ rspec -Ilib spec
+popd
+
+%files
+%{!?_licensedir:%global license %%doc}
+%dir %{gem_instdir}
+%license %{gem_instdir}/LICENSE.txt
+%doc %{gem_instdir}/README.md
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/CHANGELOG.txt
+%exclude %{gem_instdir}/spec
+
+%changelog
+* Fri Nov 07 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.0.5-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..9664843
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0de1420c7e61ad8b04653852278517dd rufus-lru-1.0.5.gem