fec72c6
%global gem_name thin
1b29e6e
1b29e6e
Summary: A thin and fast web server
fec72c6
Name: rubygem-%{gem_name}
087f042
Version: 1.6.2
087f042
Release: 1%{?dist}
1b29e6e
Group: Development/Languages
5c5b69d
License: (GPLv2 or Ruby) and MIT
1b29e6e
URL: http://code.macournoyer.com/thin/
5c5b69d
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
087f042
# git clone https://github.com/macournoyer/thin.git && cd thin && git checkout v1.6.2
087f042
# tar czvf thin-1.6.2-tests.tgz spec/
5c5b69d
Source1: %{gem_name}-%{version}-tests.tgz
d15c682
# https://github.com/macournoyer/thin/issues/76
d15c682
Patch3: rubygem-thin-fix-install-spec.patch
Michal Fojtik 9cc9e7d
Requires: curl
fb95e04
BuildRequires: ruby(release)
1b29e6e
BuildRequires: ruby-devel
fec72c6
BuildRequires: rubygems-devel
5c5b69d
BuildRequires: rubygem(rspec)
1b29e6e
BuildRequires: rubygem(eventmachine) >= 0.12.6
1b29e6e
BuildRequires: rubygem(daemons) >= 1.0.9
1b29e6e
BuildRequires: rubygem(rack) >= 1.0.0
1b29e6e
1b29e6e
%description
Chris Lalancette 8f44cf9
Thin is a Ruby web server that glues together three of the best Ruby
Chris Lalancette 8f44cf9
libraries in web history.
Chris Lalancette 8f44cf9
The Mongrel parser, the root of Mongrel speed and security,
1b29e6e
Event Machine, a network I/O library with extremely high scalability and
1b29e6e
Rack, a minimal interface between webservers and Ruby frameworks.
1b29e6e
Michal Fojtik 9cc9e7d
%package doc
Michal Fojtik 9cc9e7d
Summary: Documentation for %{name}
Michal Fojtik 9cc9e7d
Group: Documentation
Michal Fojtik 9cc9e7d
Requires:%{name} = %{version}-%{release}
Michal Fojtik 9cc9e7d
Michal Fojtik 9cc9e7d
%description doc
Michal Fojtik 9cc9e7d
Documentation for %{name}
Michal Fojtik 9cc9e7d
1b29e6e
%prep
Chris Lalancette 8f44cf9
%setup -q -c -T
fb95e04
%gem_install -n %{SOURCE0}
1b29e6e
1b29e6e
%build
1b29e6e
1b29e6e
%install
fec72c6
mkdir -p %{buildroot}%{gem_dir}
5c5b69d
cp -pa .%{gem_dir}/* \
5c5b69d
        %{buildroot}%{gem_dir}/
5c5b69d
8b98eeb
mkdir -p %{buildroot}%{gem_extdir_mri}
8b98eeb
cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
8b98eeb
8b98eeb
# Prevent dangling symlink in -debuginfo.
8b98eeb
rm -rf %{buildroot}%{gem_instdir}/ext
8b98eeb
5c5b69d
5c5b69d
mkdir -p %{buildroot}%{_bindir}
5c5b69d
cp -pa .%{_bindir}/* \
5c5b69d
        %{buildroot}%{_bindir}/
5c5b69d
5c5b69d
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
5c5b69d
087f042
# Find files with a shebang that do not have executable permissions
087f042
for file in `find %{buildroot}/%{gem_instdir}/example -type f ! -perm /a+x -name "*.ru"`; do
087f042
    [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
087f042
done
1b29e6e
1b29e6e
%check
fec72c6
pushd .%{gem_instdir}
d15c682
5c5b69d
tar xzvf %{SOURCE1}
5c5b69d
d15c682
# Depends on rubygem-benchmark_unit, not available in Fedora yet.
d15c682
rm -rf spec/perf
d15c682
# The 'should force kill process in pid file' spec is not compatible with RSpec2.
d15c682
# https://github.com/rspec/rspec-core/issues/520
087f042
sed -i "/'should force kill process in pid file'/a \    pending" spec/daemonizing_spec.rb
087f042
087f042
# These 2 tests are passing independently, but fails when running with the
087f042
# whole testsuite.
087f042
sed -i '/"tracing routines (with NO custom logger)"/a \    before { pending }' spec/logging_spec.rb
087f042
087f042
# https://github.com/macournoyer/thin/issues/232
087f042
sed -i '/"should close body tempfile when closing"/a \    pending' spec/request/processing_spec.rb
d15c682
5c5b69d
cat %{PATCH3} | patch -p1
5c5b69d
8b98eeb
rspec -I$(dirs +1)%{gem_extdir_mri} spec
d15c682
1b29e6e
popd
1b29e6e
1b29e6e
%files
5c5b69d
%{gem_instdir}/README.md
fec72c6
%{_bindir}/%{gem_name}
5c5b69d
%dir %{gem_instdir}
5c5b69d
%{gem_instdir}/bin
fec72c6
%dir %{gem_libdir}
fec72c6
%{gem_libdir}/thin.rb
fec72c6
%{gem_libdir}/rack/
fec72c6
%dir %{gem_libdir}/thin/
fec72c6
%{gem_libdir}/thin/*.rb
fec72c6
%{gem_libdir}/thin/backends/
fec72c6
%{gem_libdir}/thin/controllers/
Chris Lalancette 8286c79
# BSD
fec72c6
%{gem_libdir}/thin/stats.html.erb
5c5b69d
%{gem_extdir_mri}
5c5b69d
%exclude %{gem_cache}
5c5b69d
%{gem_spec}
Michal Fojtik 9cc9e7d
Michal Fojtik 9cc9e7d
%files doc
fec72c6
%{gem_docdir}
fec72c6
%{gem_instdir}/example/
fec72c6
%{gem_instdir}/CHANGELOG
fec72c6
%{gem_instdir}/Rakefile
1b29e6e
1b29e6e
%changelog
087f042
* Wed May 21 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.2-1
087f042
- Update to thin 1.6.2.
087f042
8b98eeb
* Wed Apr 16 2014 Josef Stribny <jstribny@redhat.com> - 1.5.0-3
8b98eeb
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1
8b98eeb
97bf81f
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-2
97bf81f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
97bf81f
5c5b69d
* Thu Feb 28 2013 Vít Ondruch <vondruch@redhat.com> - 1.5.0-1
5c5b69d
- Update to thin 1.5.0.
5c5b69d
fb95e04
* Thu Feb 28 2013 Vít Ondruch <vondruch@redhat.com> - 1.3.1-6
fb95e04
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
fb95e04
1724bdc
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-5
1724bdc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1724bdc
da006a3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
da006a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
da006a3
fec72c6
* Wed Feb 01 2012 Vít Ondruch <vondruch@redhat.com> - 1.3.1-3
fec72c6
- Rebuilt for Ruby 1.9.3.
fec72c6
02302bc
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
02302bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
02302bc
d15c682
* Fri Nov 25 2011 Vít Ondruch <vondruch@redhat.com> - 1.3.1-1
d15c682
- Update to Thin 1.3.1.
d15c682
Chris Lalancette b43612c
* Tue Sep 06 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-10
Chris Lalancette b43612c
- Bump the release so upgrades from F-16 work
Chris Lalancette b43612c
Chris Lalancette 8286c79
* Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-3
Chris Lalancette 8286c79
- Move stats.html.erb to the main package (it is a runtime requirement)
Chris Lalancette 8286c79
Chris Lalancette 7c85dd7
* Fri Jul 22 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-2
Chris Lalancette 7c85dd7
- Fix the load path for thin_parser
Chris Lalancette 7c85dd7
Michal Fojtik 63b03ef
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.11-1
Michal Fojtik 63b03ef
- Version bump
Michal Fojtik 63b03ef
Michal Fojtik 5785e01
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-3
Michal Fojtik 5785e01
- Removed Rake dependency completely
Michal Fojtik 5785e01
Michal Fojtik e6a74af
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-2
Michal Fojtik e6a74af
- Fixed RSpec tests
Michal Fojtik e6a74af
Michal Fojtik 9cc9e7d
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-1
Michal Fojtik 9cc9e7d
- Updated to upstream version
Michal Fojtik 9cc9e7d
339c9a7
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-2
339c9a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
339c9a7
Michal Fojtik b3f35a4
* Wed Sep 08 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.7-1
Michal Fojtik b3f35a4
- Updated to upstream version
Michal Fojtik b3f35a4
5c5b69d
* Thu Feb 04 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-5
1b29e6e
- Excluded ppc64 in tests (566401)
1b29e6e
- Fixed Licensing
1b29e6e
5c5b69d
* Wed Feb 03 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-4
1b29e6e
- Added rspec tests
1b29e6e
- Fixed unwanted recompilation
1b29e6e
- Fixed licensing
1b29e6e
1b29e6e
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-3
1b29e6e
- Fixed description
1b29e6e
1b29e6e
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-2
1b29e6e
- Build fixed
1b29e6e
- Licence corrected
1b29e6e
- Added missing requires
1b29e6e
- Marked relevant files as documentation
1b29e6e
1b29e6e
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-1
1b29e6e
- Initial package
1b29e6e
1b29e6e