summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-11-23 15:19:06 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-11-23 15:19:06 -0700
commitf3dd1b8abaf431974e93aa5b4e800d12a6ff3821 (patch)
treebbfee3cd684770b7f647605366213ec631c5d273
downloadrubygem-unicorn-f3dd1b8abaf431974e93aa5b4e800d12a6ff3821.tar.gz
rubygem-unicorn-f3dd1b8abaf431974e93aa5b4e800d12a6ff3821.tar.xz
rubygem-unicorn-f3dd1b8abaf431974e93aa5b4e800d12a6ff3821.zip
initial import from rubygem-unicorn-4.6.3-1
https://bugzilla.redhat.com/show_bug.cgi?id=786636#c9
-rw-r--r--.gitignore1
-rw-r--r--rubygem-unicorn.spec245
-rw-r--r--sources1
3 files changed, 247 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..74e234b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/unicorn-4.6.3.gem
diff --git a/rubygem-unicorn.spec b/rubygem-unicorn.spec
new file mode 100644
index 0000000..efbc571
--- /dev/null
+++ b/rubygem-unicorn.spec
@@ -0,0 +1,245 @@
+%global gem_name unicorn
+
+%if 0%{?fedora} >= 18
+%global rubyabi 1.9.1
+%endif
+
+%if 0%{?fedora} >= 19
+%global rubyabi 2.0.0
+%endif
+
+Summary: Rack HTTP server for fast clients and Unix
+Name: rubygem-%{gem_name}
+Version: 4.6.3
+Release: 1%{?dist}
+Group: Development/Languages
+License: GPLv2 or GPLv3 or Ruby
+URL: http://unicorn.bogomips.org/
+Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%if 0%{?fedora} >= 19
+Requires: ruby(release)
+%endif
+
+%if 0%{?fedora} >= 17 && 0%{?fedora} < 19
+Requires: ruby(abi) = %{rubyabi}
+%endif
+
+Requires: rubygem(raindrops) >= 0.7
+Requires: rubygem(kgio) >= 2.6
+BuildRequires: ruby-devel
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(rack)
+BuildRequires: rubygem(raindrops) >= 0.7
+BuildRequires: rubygem(kgio) >= 2.6
+BuildRequires: rubygem(minitest)
+ExcludeArch: ppc ppc64
+Provides: rubygem(%{gem_name}) = %{version}
+
+%description
+Unicorn is an HTTP server for Rack applications designed to only serve fast
+clients on low-latency, high-bandwidth connections and take advantage of
+features in Unix/Unix-like kernels. Slow clients should only be served by
+placing a reverse proxy capable of fully buffering both the the request and
+response in between Unicorn and slow clients.
+
+%package doc
+Summary: Documentation files, rdoc, ri, examples and tests
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}
+
+%prep
+%setup -q -c -T
+
+%build
+mkdir -p .%{gem_dir}
+export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+gem install --local --install-dir .%{gem_dir} \
+ -V \
+ --force %{SOURCE0}
+
+# Fix wrong shebang
+%if 0%{?fedora} >= 17
+grep -rl /this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby \
+ ./usr/share/gems/gems/%{gem_name}-%{version}/bin/unicorn | \
+ xargs sed -i -e 's|/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby|/usr/bin/ruby|'
+
+grep -rl /this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby \
+ ./usr/share/gems/gems/%{gem_name}-%{version}/bin/unicorn_rails | \
+ xargs sed -i -e 's|/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby|/usr/bin/ruby|'
+%endif
+
+# Fixing test-suite files
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_configurator.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_http_parser_ng.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_http_parser_xftrust.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_response.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_signals.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_stream_input.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_upload.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_droplet.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_http_parser.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_request.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_server.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_socket_helper.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_tee_input.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_util.rb
+
+sed -i '2 i\
+require "rubygems"' .%{gem_instdir}/test/unit/test_sni_hostnames.rb
+
+##sed -i '2 i\
+##require "rubygems"' .%{gem_instdir}/test/rails/test_rails.rb
+
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{_bindir}
+cp -a .%{gem_dir}/bin/unicorn %{buildroot}%{_bindir}/
+cp -a .%{gem_dir}/bin/unicorn_rails %{buildroot}%{_bindir}/
+
+# Remove leftovers
+rm %{buildroot}/%{gem_instdir}/.CHANGELOG.old
+rm %{buildroot}/%{gem_instdir}/.document
+rm %{buildroot}/%{gem_instdir}/.gitignore
+rm %{buildroot}/%{gem_instdir}/.mailmap
+rm %{buildroot}/%{gem_instdir}/.manifest
+rm %{buildroot}/%{gem_instdir}/GIT-VERSION-FILE
+rm %{buildroot}/%{gem_instdir}/GIT-VERSION-GEN
+rm %{buildroot}/%{gem_instdir}/GNUmakefile
+rm %{buildroot}/%{gem_instdir}/setup.rb
+rm %{buildroot}/%{gem_instdir}/.wrongdoc.yml
+rm -rf %{buildroot}%{gem_instdir}/ext
+find %{buildroot} -name .gitignore -exec rm {} +
+find %{buildroot} -name .gitkeep -exec rm {} +
+rm %{buildroot}/%{gem_instdir}/%{gem_name}.gemspec
+
+# In case you have yard installed
+rm -rf %{buildroot}%{gem_instdir}/.yardoc
+
+# Ajustar permisos, non readable 0600L
+chmod a+r %{buildroot}%{gem_instdir}/NEWS
+chmod a+r %{buildroot}%{gem_instdir}/ChangeLog
+
+mkdir -p %{buildroot}%{_mandir}
+mv %{buildroot}/%{gem_instdir}/man/* %{buildroot}%{_mandir}/
+
+# If there are C extensions, mv them to the extdir.
+# You must replace REQUIRE_PATHS according to your gem specifics.
+install -d -m0755 %{buildroot}%{gem_extdir_mri}/lib
+mv %{buildroot}%{gem_instdir}/lib/unicorn_http.so %{buildroot}%{gem_extdir_mri}/lib/
+
+%if 0%{?fedora} >= 18
+%endif
+
+%check
+cd %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}
+
+echo "Running tests"
+
+%if 0%{?fedora} >= 18
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_configurator.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_droplet.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_http_parser.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_http_parser_ng.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_http_parser_xftrust.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_request.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_response.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_server.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_signals.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_sni_hostnames.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_socket_helper.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_stream_input.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_upload.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_tee_input.rb
+RUBYOPT="-Ilib -I%{buildroot}%{gem_extdir} -Itest" testrb test/unit/test_util.rb
+#RUBYOPT="-Ilib -I%%{buildroot}%%{gem_extdir} -Itest" testrb test/rails/test_rails.rb
+%endif
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%{gem_extdir_mri}/*
+%dir %{gem_instdir}
+%{gem_cache}
+%{gem_spec}
+%{gem_instdir}/lib
+%{gem_dir}/bin/unicorn
+%{gem_dir}/bin/unicorn_rails
+%{_bindir}/unicorn
+%{_bindir}/unicorn_rails
+%{gem_instdir}/bin/unicorn
+%{gem_instdir}/bin/unicorn_rails
+%doc %{_mandir}/man1/unicorn.1.gz
+%doc %{_mandir}/man1/unicorn_rails.1.gz
+%doc %{gem_instdir}/LICENSE
+%doc %{gem_instdir}/COPYING
+%doc %{gem_instdir}/CONTRIBUTORS
+%doc %{gem_instdir}/README
+%doc %{gem_instdir}/Application_Timeouts
+%doc %{gem_instdir}/LATEST
+%doc %{gem_instdir}/Links
+
+%files doc
+%defattr(-, root, root, -)
+%doc %{gem_instdir}/ChangeLog
+%doc %{gem_instdir}/FAQ
+%doc %{gem_instdir}/DESIGN
+%doc %{gem_instdir}/HACKING
+%doc %{gem_instdir}/ISSUES
+%doc %{gem_instdir}/KNOWN_ISSUES
+%doc %{gem_instdir}/NEWS
+%doc %{gem_instdir}/PHILOSOPHY
+%doc %{gem_instdir}/SIGNALS
+%doc %{gem_instdir}/Sandbox
+%doc %{gem_instdir}/TODO
+%doc %{gem_instdir}/TUNING
+%doc %{gem_instdir}/local.mk.sample
+%doc %{gem_dir}/doc/%{gem_name}-%{version}
+%doc %{gem_instdir}/test
+%doc %{gem_instdir}/t
+%doc %{gem_instdir}/Documentation
+%doc %{gem_instdir}/examples
+%{gem_instdir}/Rakefile
+%{gem_instdir}/script
+
+%changelog
+* Mon Aug 5 2013 Guillermo Gómez <gomix@fedoraproject.org> - 4.6.3-1
+- Initial package with version 4.6.3
diff --git a/sources b/sources
new file mode 100644
index 0000000..a8c2fd4
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2e627fe7977eb48b02a2b580ff67583c unicorn-4.6.3.gem