[rubygem-org-ruby/f20] initial package import (RHBZ #1036901)

Ken Dreyer ktdreyer at fedoraproject.org
Thu Feb 13 16:45:55 UTC 2014


commit 138c6205ba563776cfdb3b55f486d0c445bd5c0a
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Thu Feb 13 08:16:29 2014 -0700

    initial package import (RHBZ #1036901)

 .gitignore                                |    2 +
 rubygem-org-ruby-generate-test-tarball.sh |   26 +++++++
 rubygem-org-ruby.spec                     |  106 +++++++++++++++++++++++++++++
 sources                                   |    2 +
 4 files changed, 136 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..13bab17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/org-ruby-0.9.0-tests.tar.xz
+/org-ruby-0.9.0.gem
diff --git a/rubygem-org-ruby-generate-test-tarball.sh b/rubygem-org-ruby-generate-test-tarball.sh
new file mode 100755
index 0000000..b68872e
--- /dev/null
+++ b/rubygem-org-ruby-generate-test-tarball.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+VERSION=0.9.0
+
+GITHUBURL=https://github.com/bdewey/org-ruby/archive/version-${VERSION}.zip
+
+# download zipball
+if [[ ! -f org-ruby-$VERSION.zip ]]; then
+    curl -o org-ruby-$VERSION.zip -L $GITHUBURL
+fi
+
+# extract zipball
+[[ -d org-ruby-version-$VERSION ]] && rm -r org-ruby-version-$VERSION
+unzip org-ruby-$VERSION.zip
+
+pushd org-ruby-version-$VERSION
+  # repack
+  tar -cJvf org-ruby-$VERSION-tests.tar.xz spec
+  mv org-ruby-$VERSION-tests.tar.xz ..
+popd
+
+# Clean up
+rm org-ruby-$VERSION.zip
+rm -r org-ruby-version-$VERSION
diff --git a/rubygem-org-ruby.spec b/rubygem-org-ruby.spec
new file mode 100644
index 0000000..213da67
--- /dev/null
+++ b/rubygem-org-ruby.spec
@@ -0,0 +1,106 @@
+%global gem_name org-ruby
+
+Name: rubygem-%{gem_name}
+Version: 0.9.0
+Release: 1%{?dist}
+Summary: Ruby routines for parsing org-mode files
+Group: Development/Languages
+License: MIT
+URL: https://github.com/bdewey/org-ruby
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Upstream does not ship the test suite in the gem.
+Source1: %{name}-generate-test-tarball.sh
+Source2: %{gem_name}-%{version}-tests.tar.xz
+Requires: ruby(release)
+Requires: ruby(rubygems)
+Requires: rubygem(rubypants)
+Requires: rubygem(tilt)
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(rubypants)
+BuildRequires: rubygem(tilt)
+BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}
+
+%description
+An org-mode parser written in Ruby. This gem contains Ruby routines for
+parsing org-mode files. The most significant thing this library does
+today is convert org-mode files to HTML or textile. Currently, you
+cannot do much to customize the conversion. The supplied textile
+conversion is optimized for extracting "content" from the orgfile as
+opposed to "metadata."
+
+
+%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}/
+
+
+mkdir -p %{buildroot}%{_bindir}
+cp -pa .%{_bindir}/* \
+        %{buildroot}%{_bindir}/
+
+find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
+
+%check
+export LANG=en_US.UTF-8
+cp -pr spec .%{gem_instdir}
+pushd .%{gem_instdir}
+  # Tests currently fail because the HTML output is tightly coupled with
+  # specific Tilt versions. When upstream itself has stable Travis builds, we
+  # can re-examine this.  https://travis-ci.org/wallyqs/org-ruby
+  rspec -Ilib spec || :
+  rm -rf spec
+popd
+
+%files
+%dir %{gem_instdir}
+%doc %{gem_instdir}/README.rdoc
+%{_bindir}/org-ruby
+%{gem_instdir}/bin
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/History.txt
+
+%changelog
+* Mon Feb 10 2014 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.9.0-1
+- Update to org-mode 0.9.0
+- Remove %%{gem_instdir}/bin/org-ruby from -doc sub-package
+
+* Wed Feb 05 2014 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.8.3-1
+- Update to org-mode 0.8.3
+- Adjust tests tarball generation script to tidy up after running
+
+* Mon Dec 02 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.8.2-2
+- Remove macro-in-comment for rpmlint
+
+* Mon Dec 02 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.8.2-1
+- Initial package
diff --git a/sources b/sources
index e69de29..91e6b9d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+e0c8db2bea63d47ea66f291aef92edb9  org-ruby-0.9.0-tests.tar.xz
+131a1c7d748ba010d96cb4079580f410  org-ruby-0.9.0.gem


More information about the scm-commits mailing list