diff --git a/rubygem-thin.spec b/rubygem-thin.spec index 7235163..b257bdc 100644 --- a/rubygem-thin.spec +++ b/rubygem-thin.spec @@ -3,7 +3,7 @@ %global geminstdir %{gemdir}/gems/%{gemname}-%{version} %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ') %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") -%global rubyabi 1.8 +%global rubyabi 1.8 Summary: A thin and fast web server Name: rubygem-%{gemname} @@ -14,16 +14,15 @@ License: (GPLv2 or Ruby) and BSD and MIT URL: http://code.macournoyer.com/thin/ Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem Patch1: rubygem-thin-fix-parser-load-path.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: ruby(abi) = %{rubyabi} +Requires: ruby(abi) = %{rubyabi} Requires: rubygems Requires: rubygem(rack) >= 1.0.0 Requires: rubygem(eventmachine) >= 0.12.6 Requires: rubygem(daemons) >= 1.0.9 Requires: curl -BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby-devel -BuildRequires: ruby(rubygems) +BuildRequires: ruby(rubygems) BuildRequires: curl BuildRequires: libcurl-devel BuildRequires: rubygem(rake-compiler) @@ -35,9 +34,9 @@ BuildRequires: rubygem(rack) >= 1.0.0 Provides: rubygem(%{gemname}) = %{version} %description -Thin is a Ruby web server that glues together three of the best Ruby -libraries in web history. -The Mongrel parser, the root of Mongrel speed and security, +Thin is a Ruby web server that glues together three of the best Ruby +libraries in web history. +The Mongrel parser, the root of Mongrel speed and security, Event Machine, a network I/O library with extremely high scalability and Rack, a minimal interface between webservers and Ruby frameworks. @@ -50,14 +49,10 @@ Requires:%{name} = %{version}-%{release} Documentation for %{name} %prep -%setup -q -c -T +%setup -q -c -T mkdir -p ./%{gemdir} export CONFIGURE_ARGS="--with-cflags='%{optflags}'" -gem install \ - --local \ - --install-dir ./%{gemdir} \ - -V --force \ - %{SOURCE0} +gem install --local --install-dir ./%{gemdir} -V --force %{SOURCE0} pushd ./%{geminstdir} %patch1 popd @@ -68,18 +63,18 @@ popd rm -rf %{buildroot} mkdir -p %{buildroot}%{ruby_sitearch}/%{gemname} mkdir -p %{buildroot}%{gemdir} -mkdir -p %{buildroot}%{_prefix} +mkdir -p %{buildroot}%{_prefix} cp -a ./%{gemdir}/* %{buildroot}%{gemdir} mv %{buildroot}%{geminstdir}/lib/*.so %{buildroot}%{ruby_sitearch}/ -mv -f %{buildroot}%{gemdir}/bin %{buildroot}%{_prefix} +mv -f %{buildroot}%{gemdir}/bin %{buildroot}%{_prefix} for f in $(find %{buildroot}%{geminstdir} -name \*.rb); do - sed -i -e '/^#!/d' $f - chmod 0644 $f + sed -i -e '/^#!/d' $f + chmod 0644 $f done find %{buildroot}%{geminstdir} -type f -exec sed -i 's/^#!\/usr\/local\/bin\/ruby/#!\/usr\/bin\/ruby/g' {} \; chmod +x %{buildroot}%{geminstdir}/lib/thin/controllers/service.sh.erb -rm -rf %{buildroot}%{geminstdir}/{ext,tmp}/ -rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths} +rm -rf %{buildroot}%{geminstdir}/{ext,tmp}/ +rm -f %{buildroot}%{geminstdir}/{.autotest,.require_paths} %check # https://bugzilla.redhat.com/show_bug.cgi?id=566401 @@ -97,23 +92,15 @@ spec/daemonizing_spec.rb spec/server/unix_socket_spec.rb spec/server/swiftiply_spec.rb ) -SPECS2 = %w(spec/server/threaded_spec.rb spec/server/tcp_spec.rb) +SPECS2 = %w(spec/server/threaded_spec.rb spec/server/tcp_spec.rb) puts Dir['spec/**/*_spec.rb'] - PERF_SPECS - WIN_SPECS - SPECS2 " | ruby` popd -%clean -rm -rf %{buildroot} - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - %files -%defattr(-, root, root, -) -%{_bindir}/%{gemname} -%{ruby_sitearch}/thin_parser.so -%dir %{geminstdir}/ +%{_bindir}/%{gemname} +%{ruby_sitearch}/thin_parser.so +%dir %{geminstdir}/ %{geminstdir}/bin/ %dir %{geminstdir}/lib %{geminstdir}/lib/thin.rb @@ -122,8 +109,8 @@ rm -rf %{buildroot} %{geminstdir}/lib/thin/*.rb %{geminstdir}/lib/thin/backends/ %{geminstdir}/lib/thin/controllers/ -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec %files doc %defattr(-, root, root, -)