diff --git a/.gitignore b/.gitignore index e69de29..5acae96 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/http-cookie-1.0.2.gem diff --git a/rubygem-http-cookie.spec b/rubygem-http-cookie.spec new file mode 100644 index 0000000..6d7fcdd --- /dev/null +++ b/rubygem-http-cookie.spec @@ -0,0 +1,106 @@ +%global gem_name http-cookie +%global rubyabi 1.9.1 + +Name: rubygem-%{gem_name} +Version: 1.0.2 +Release: 2%{?dist} + +Summary: Ruby library to handle HTTP Cookies based on RFC 6265 +Group: Development/Languages +License: MIT +URL: https://github.com/sparklemotion/http-cookie +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem + +%if 0%{?fedora} >= 19 +Requires: ruby(release) +BuildRequires: ruby(release) +%else +Requires: ruby(abi) = %{rubyabi} +Requires: ruby +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: ruby +%endif + +BuildRequires: rubygems-devel +# %%check +BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(domain_name) +BuildRequires: rubygem(sqlite3) +Requires: ruby(rubygems) +Requires: rubygem(domain_name) + +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version}-%{release} + +%description +HTTP::Cookie is a Ruby library to handle HTTP Cookies based on RFC 6265. It +has with security, standards compliance and compatibility in mind, to behave +just the same as today's major web browsers. It has builtin support for the +legacy cookies.txt and the latest cookies.sqlite formats of Mozilla Firefox, +and its modular API makes it easy to add support for a new backend store. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +%setup -q -c -T + +TOPDIR=$(pwd) +mkdir tmpunpackdir +pushd tmpunpackdir + +gem unpack %{SOURCE0} +cd %{gem_name}-%{version} + +gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec +gem build %{gem_name}.gemspec +mv %{gem_name}-%{version}.gem $TOPDIR + +popd +rm -rf tmpunpackdir + +%build +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +# Clean up +pushd %{buildroot}%{gem_instdir} +rm -f .gitignore .travis.yml +rm -f Gemfile Rakefile +rm -f %{gem_name}.gemspec +popd + +%check +pushd .%{gem_instdir} +ruby -Ilib:test:. -e 'Dir.glob("test/test_*.rb").each {|f| require f}' +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/[A-Z]* + +%{gem_libdir}/ +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir}/ +%exclude %{gem_instdir}/test/ + +%changelog +* Mon Nov 11 2013 Mamoru TASAKA - 1.0.2-2 +- Add BR: rubygem(sqlite3) for %%check (bug 1022827) + +* Thu Oct 24 2013 Mamoru TASAKA - 1.0.2-1 +- Initial package diff --git a/sources b/sources index e69de29..568c9eb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +70529d56540a162f52ce361a389a0307 http-cookie-1.0.2.gem