[rubygem-gherkin/el6/master] Initial import

Michal fojtik mfojtik at fedoraproject.org
Mon Aug 2 12:55:06 UTC 2010


commit 94bfe4212b20a71ba6e90bb6fddc04e999093f6f
Author: Michal Fojtik <mfojtik at redhat.com>
Date:   Mon Aug 2 14:55:45 2010 +0200

    Initial import

 .gitignore           |    1 +
 rubygem-gherkin.spec |  156 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    1 +
 3 files changed, 158 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8834bc7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+gherkin-2.1.5.gem
diff --git a/rubygem-gherkin.spec b/rubygem-gherkin.spec
new file mode 100644
index 0000000..f391f21
--- /dev/null
+++ b/rubygem-gherkin.spec
@@ -0,0 +1,156 @@
+%global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname gherkin
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global rubyabi 1.8
+
+Summary: Fast Gherkin lexer/parser
+Name: rubygem-%{gemname}
+Version: 2.1.5
+Release: 3%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://github.com/aslakhellesoy/gherkin
+Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: ruby(abi) = %{rubyabi} 
+Requires: rubygems
+Requires: rubygem(trollop)
+BuildRequires: ruby(rubygems) 
+BuildRequires: ruby-devel
+Provides: rubygem(%{gemname}) = %{version}
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires:%{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
+
+%description
+A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
+
+
+%prep
+%setup -q -c -T 
+mkdir -p ./%{gemdir}
+gem install \
+	--local \
+	--install-dir ./%{gemdir} \
+	--force \
+	%{SOURCE0}
+pushd %{_builddir}/%{name}-%{version}/%{geminstdir}/ext
+# Fix trollop version
+# TODO: Revert this to newer version once trollop will be upgraded
+sed -i -e "s|1.16.2|1.15|" ../Rakefile
+# Recompile all shared libraries using -O2 optimalization flag
+rm -rf ../lib/*.so
+for lexer_dir in */ ; do
+  pushd $lexer_dir
+  mkdir ext
+  pushd ext
+  ln -sf .. ${lexer_dir%/}
+  popd
+  sed -i 's/ -O0 / -O2 /' extconf.rb
+  # Remove #line lines from C codes
+  sed -ie 's/^#line .*$ / -O2 /' *.c
+  CONFIGURE_ARGS="--with-cflags='%{optflags}'" ruby extconf.rb
+  make clean && make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
+  make install RUBYARCHDIR="../../lib"
+  popd
+done
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{ruby_sitearch}/%{gemname}
+mkdir -p %{buildroot}%{gemdir}
+mkdir -p %{buildroot}%{_prefix}
+cp -a ./%{gemdir}/* %{buildroot}%{gemdir}
+mv -f %{buildroot}%{geminstdir}/lib/*.so %{buildroot}%{ruby_sitearch}/
+mv -f %{buildroot}%{gemdir}/bin %{buildroot}%{_prefix} 
+find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
+# Remove duplicate object files
+rm -f %{buildroot}%{geminstdir}/ext/*/*.so
+rm -f %{buildroot}%{geminstdir}/ext/*/*.o
+rm -f %{buildroot}%{geminstdir}/ext/*/Makefile
+# Remove git files
+rm -f %{buildroot}%{geminstdir}/.gitattributes
+rm -f %{buildroot}%{geminstdir}/.gitignore
+rm -f %{buildroot}%{geminstdir}/.mailmap
+rm -f %{buildroot}%{geminstdir}/.rspec
+rm -f %{buildroot}%{geminstdir}/ikvm/.gitignore
+rm -f %{buildroot}%{geminstdir}/java/.gitignore
+rm -f %{buildroot}%{geminstdir}/java/src/main/java/gherkin/lexer/.gitignore
+rm -f %{buildroot}%{geminstdir}/tasks/bench/generated/.gitignore
+rm -f %{buildroot}%{geminstdir}/lib/gherkin/rb_lexer/.gitignore
+rm -f %{buildroot}%{geminstdir}/java/src/main/resources/gherkin/.gitignore
+rm -f %{buildroot}%{geminstdir}/lib/.gitignore
+rm -f %{buildroot}%{geminstdir}/ragel/i18n/.gitignore
+# Fix wrong executable flag on files
+chmod -x %{buildroot}%{geminstdir}/tasks/ragel_task.rb
+chmod -x %{buildroot}%{geminstdir}/tasks/compile.rake
+# Fix DOS formatted line ends
+sed -i -e "s|\r||" %{buildroot}%{geminstdir}/spec/gherkin/fixtures/dos_line_endings.feature
+sed -i -e "s|\r||" %{buildroot}%{geminstdir}/spec/gherkin/fixtures/with_bom.feature
+# Fix incompatible version of RSpec
+# TODO: Update these packages in Fedora and remove this lines
+sed -i -e "s|2.0.0.beta.17|1.3.0|" %{buildroot}%{geminstdir}/Rakefile
+sed -i -e "s|1.16.2|1.15|" %{buildroot}%{geminstdir}/Rakefile
+sed -i -e "s|2.0.0.beta.17|1.3.0|" %{buildroot}%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+sed -i -e "s|1.16.2|1.15|" %{buildroot}%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%{_bindir}/%{gemname} 
+%dir %{geminstdir}
+%dir %{geminstdir}/bin
+%{ruby_sitearch}/%{gemname}_*.so
+%{geminstdir}/bin/gherkin
+%{geminstdir}/lib
+%{geminstdir}/ragel
+%{geminstdir}/java
+%{geminstdir}/ikvm
+%doc %{geminstdir}/features
+%doc %{geminstdir}/spec
+%doc %{geminstdir}/LICENSE
+%doc %{geminstdir}/README.rdoc
+%doc %{geminstdir}/History.txt
+%doc %{geminstdir}/VERSION.yml
+%doc %{geminstdir}/cucumber.yml
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+%files doc
+%defattr(-, root, root, -)
+%{geminstdir}/Rakefile
+%{geminstdir}/ext
+%{geminstdir}/tasks
+%{gemdir}/doc/%{gemname}-%{version}
+
+%changelog
+* Wed Jul 20 2010 Michal Fojtik <mfojtik at redhat.com> - 2.1.5-3
+- Fixed rspec and trollop versions in gemspec files
+
+* Wed Jul 20 2010 Michal Fojtik <mfojtik at redhat.com> - 2.1.5-2
+- Added -doc subpackage
+- Fixed debugging symbols issue (Thanks mtasaka)
+- Fixed path for pushd in install section
+- Fixed trollop version in gemspec
+- Removed '#line foo' from C files
+
+* Wed Jul 19 2010 Michal Fojtik <mfojtik at redhat.com> - 2.1.5-1
+- Updated to latest version
+- Fixed compiler flags
+- Fixed directory ownership
+- Removed unwanted versioning files
+- Placed .so files on right place
+
+* Wed Jul 14 2010 Michal Fojtik <mfojtik at redhat.com> - 2.1.3-1
+- Initial package
diff --git a/sources b/sources
index e69de29..ae8758e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+01c4cd6665d18f61eb18b10cfd24e8ac  gherkin-2.1.5.gem


More information about the scm-commits mailing list