[rubygem-thin] Specfile cleanup.

Chris Lalancette clalance at fedoraproject.org
Mon Jul 25 08:00:48 UTC 2011


commit 8f44cf92e6fee03e974e8c0df9729d2985bb7686
Author: Chris Lalancette <clalance at redhat.com>
Date:   Fri Jul 22 13:22:30 2011 -0400

    Specfile cleanup.
    
    Signed-off-by: Chris Lalancette <clalance at redhat.com>

 rubygem-thin.spec |   52 +++++++++++++++++++++-------------------------------
 1 files changed, 21 insertions(+), 31 deletions(-)
---
diff --git a/rubygem-thin.spec b/rubygem-thin.spec
index fd3c9b1..77cd935 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}
@@ -13,16 +13,15 @@ Group: Development/Languages
 License: (GPLv2 or Ruby) and BSD and MIT
 URL: http://code.macournoyer.com/thin/
 Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
-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)
@@ -34,9 +33,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.
 
@@ -49,14 +48,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}
 
 %build
 
@@ -64,18 +59,18 @@ gem install \
 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 -f %{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
@@ -93,19 +88,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}
-
 %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
@@ -114,11 +105,10 @@ 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, -)
 %{gemdir}/doc/%{gemname}-%{version}
 %{geminstdir}/benchmark/
 %{geminstdir}/tasks/


More information about the scm-commits mailing list