[rubygem-rack-openid/f19] initial package import (RHBZ #1032186)

Ken Dreyer ktdreyer at fedoraproject.org
Mon Dec 2 02:29:10 UTC 2013


commit 1de7a125a06b5ae3347c04a60c1f9081bcfa71e0
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Sun Dec 1 19:28:26 2013 -0700

    initial package import (RHBZ #1032186)

 .gitignore                                   |    2 +
 rubygem-rack-openid-LICENSE                  |   20 +++++
 rubygem-rack-openid-generate-test-tarball.sh |   25 +++++++
 rubygem-rack-openid.spec                     |   99 ++++++++++++++++++++++++++
 sources                                      |    2 +
 5 files changed, 148 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..9e27b57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/rack-openid-1.4.1-tests.tar.xz
+/rack-openid-1.4.1.gem
diff --git a/rubygem-rack-openid-LICENSE b/rubygem-rack-openid-LICENSE
new file mode 100644
index 0000000..4eb22c4
--- /dev/null
+++ b/rubygem-rack-openid-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Joshua Peek
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/rubygem-rack-openid-generate-test-tarball.sh b/rubygem-rack-openid-generate-test-tarball.sh
new file mode 100755
index 0000000..d97a868
--- /dev/null
+++ b/rubygem-rack-openid-generate-test-tarball.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+VERSION=1.4.1
+
+GITHUBURL=https://github.com/grosser/rack-openid/archive/v${VERSION}.zip
+
+# download zipball
+if [[ ! -f rack-openid-$VERSION.zip ]]; then
+    curl -o rack-openid-$VERSION.zip -L $GITHUBURL
+fi
+
+# extract zipball
+rm -r rack-openid-$VERSION
+unzip rack-openid-$VERSION.zip
+
+pushd rack-openid-$VERSION
+  # repack
+  tar -cJvf rack-openid-$VERSION-tests.tar.xz test
+  mv rack-openid-$VERSION-tests.tar.xz ..
+popd
+
+# Clean up
+rm rack-openid-$VERSION.zip
diff --git a/rubygem-rack-openid.spec b/rubygem-rack-openid.spec
new file mode 100644
index 0000000..59eb1ab
--- /dev/null
+++ b/rubygem-rack-openid.spec
@@ -0,0 +1,99 @@
+%global gem_name rack-openid
+
+Name: rubygem-%{gem_name}
+Version: 1.4.1
+Release: 2%{?dist}
+Summary: Provides a more HTTPish API around the ruby-openid library
+Group: Development/Languages
+License: MIT
+URL: https://github.com/grosser/rack-openid
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Upstream does not ship the test suite in the gem.
+Source1: rubygem-rack-openid-generate-test-tarball.sh
+Source2: rack-openid-%{version}-tests.tar.xz
+# Upstream does not yet include the full text of the MIT license in any
+# released version of the gem. In the next release, we can drop this external
+# file. See https://github.com/grosser/rack-openid/issues/3
+# This Source3 file is available at
+# https://raw.github.com/grosser/rack-openid/master/LICENSE
+Source3: rubygem-rack-openid-LICENSE
+Requires: ruby(release)
+Requires: ruby(rubygems)
+Requires: rubygem(rack)
+Requires: rubygem(ruby-openid)
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(rack)
+BuildRequires: rubygem(ruby-openid)
+BuildRequires: rubygem(rots)
+BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}
+
+%description
+Provides a more HTTPish API around the ruby-openid library.
+
+
+%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} -a 2
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+%build
+# Create the gem as gem install only works on a gem file
+gem build %{gem_name}.gemspec
+
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -pa .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+# Until upstream ships the full text of the MIT license in a released gem, we
+# will ship the version from Git master.
+install -p -m 0644 %{SOURCE3} %{buildroot}%{gem_instdir}/LICENSE
+
+%check
+cp -pr test .%{gem_instdir}
+pushd .%{gem_instdir}
+  ruby -Ilib test/test_openid.rb
+  rm -rf test
+popd
+
+
+%files
+%dir %{gem_instdir}
+%doc %{gem_instdir}/LICENSE
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+
+%changelog
+* Thu Nov 28 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.4.1-2
+- Address issues from package review (RHBZ #1032186)
+- Correct comment about LICENSE
+- Unpack the tests tarball during %%setup
+- Use "set -e" in tests tarball generation script
+- Clean up zip file in tests tarball generation script
+
+* Wed Nov 27 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.4.1-1
+- Update to rack-openid 1.4.1
+- Ship license file from upstream Git
+
+* Wed Nov 06 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.4.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..3f31588 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+1bc4f1a101ee220ee4641735f245f952  rack-openid-1.4.1-tests.tar.xz
+44eb25ed758eef4ae2b7f4aad138db56  rack-openid-1.4.1.gem


More information about the scm-commits mailing list