fec72c
%global gem_name thin
1b29e6
fec72c
Name: rubygem-%{gem_name}
c45d8a
Version: 1.7.2
d875d4
Release: 4%{?dist}
e29440
Summary: A thin and fast web server
edbbdf
# lib/thin/stats.html.erb: BSD
edbbdf
# spec/rails_app/public/javascripts/*.js: MIT
edbbdf
License: (GPLv2+ or Ruby) and BSD and MIT
1b29e6
URL: http://code.macournoyer.com/thin/
e29440
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
e29440
# git clone https://github.com/macournoyer/thin.git && cd thing
c45d8a
# git checkout v1.7.2 && tar czvf thin-1.7.2-tests.tgz spec/
5c5b69
Source1: %{gem_name}-%{version}-tests.tgz
fb95e0
BuildRequires: ruby(release)
fec72c
BuildRequires: rubygems-devel
e29440
BuildRequires: ruby-devel
c45d8a
# Compiler is required for build of gem binary extension.
c45d8a
# https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires
c45d8a
BuildRequires: gcc
b673dd
BuildRequires: rubygem(rspec2)
edbbdf
BuildRequires: rubygem(eventmachine) >= 1.0.4
1b29e6
BuildRequires: rubygem(daemons) >= 1.0.9
1b29e6
BuildRequires: rubygem(rack) >= 1.0.0
1b29e6
1b29e6
%description
Chris Lalancette 8f44cf
Thin is a Ruby web server that glues together three of the best Ruby
Chris Lalancette 8f44cf
libraries in web history.
Chris Lalancette 8f44cf
The Mongrel parser, the root of Mongrel speed and security,
1b29e6
Event Machine, a network I/O library with extremely high scalability and
1b29e6
Rack, a minimal interface between webservers and Ruby frameworks.
1b29e6
Michal Fojtik 9cc9e7
%package doc
Michal Fojtik 9cc9e7
Summary: Documentation for %{name}
e29440
Requires: %{name} = %{version}-%{release}
e29440
BuildArch: noarch
Michal Fojtik 9cc9e7
Michal Fojtik 9cc9e7
%description doc
e29440
Documentation for %{name}.
Michal Fojtik 9cc9e7
1b29e6
%prep
Chris Lalancette 8f44cf
%setup -q -c -T
fb95e0
%gem_install -n %{SOURCE0}
1b29e6
1b29e6
%build
1b29e6
1b29e6
%install
fec72c
mkdir -p %{buildroot}%{gem_dir}
e29440
cp -a .%{gem_dir}/* \
5c5b69
        %{buildroot}%{gem_dir}/
5c5b69
8b98ee
mkdir -p %{buildroot}%{gem_extdir_mri}
8b98ee
cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
8b98ee
e29440
# Prevent dangling symlink in -debuginfo (rhbz#878863).
e29440
rm -rf %{buildroot}%{gem_instdir}/ext/
5c5b69
5c5b69
mkdir -p %{buildroot}%{_bindir}
c45d8a
cp -a .%{_bindir}/* \
5c5b69
        %{buildroot}%{_bindir}/
5c5b69
5c5b69
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
5c5b69
edbbdf
# Add executable bit for shebang files
edbbdf
# https://github.com/macournoyer/thin/pull/320
edbbdf
pushd %{buildroot}/%{gem_instdir}/example
edbbdf
chmod 755 async_chat.ru
edbbdf
chmod 755 async_tailer.ru
edbbdf
popd
1b29e6
1b29e6
%check
fec72c
pushd .%{gem_instdir}
d15c68
5c5b69
tar xzvf %{SOURCE1}
5c5b69
d15c68
# Depends on rubygem-benchmark_unit, not available in Fedora yet.
edbbdf
find spec/perf -name "*_spec.rb" -exec \
edbbdf
    sed -i '/be_faster_then/ i \    pending' {} \;
e29440
d15c68
# The 'should force kill process in pid file' spec is not compatible with RSpec2.
d15c68
# https://github.com/rspec/rspec-core/issues/520
d875d4
sed -i -r "/'should (force )?kill process in pid file'/a \    pending" \
d875d4
    spec/daemonizing_spec.rb
d875d4
d875d4
# To prevent timeout error on ppc64 arch.
d875d4
sed -i '/^    def server_should_start_in_less_then/,/^    end/ s/(10)/(20)/' \
d875d4
    spec/daemonizing_spec.rb
087f04
087f04
# These 2 tests are passing independently, but fails when running with the
087f04
# whole testsuite.
d875d4
sed -i '/"tracing routines (with NO custom logger)"/a \    before { pending }' \
d875d4
    spec/logging_spec.rb
087f04
c45d8a
rspec2 -I$(dirs +1)%{gem_extdir_mri} spec
d15c68
1b29e6
popd
1b29e6
1b29e6
%files
5c5b69
%dir %{gem_instdir}
e29440
%{_bindir}/thin
5c5b69
%{gem_extdir_mri}
edbbdf
%{gem_instdir}/bin
edbbdf
%{gem_libdir}
5c5b69
%exclude %{gem_cache}
5c5b69
%{gem_spec}
Michal Fojtik 9cc9e7
Michal Fojtik 9cc9e7
%files doc
e29440
%doc %{gem_docdir}
fec72c
%{gem_instdir}/example/
e29440
%doc %{gem_instdir}/CHANGELOG
e29440
%doc %{gem_instdir}/README.md
fec72c
%{gem_instdir}/Rakefile
1b29e6
1b29e6
%changelog
d875d4
* Tue Aug 08 2017 Jun Aruga <jaruga@redhat.com> - 1.7.2-4
d875d4
- Fix FTBFS.
d875d4
f2ec9b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-3
f2ec9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f2ec9b
e15468
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-2
e15468
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e15468
c45d8a
* Wed Jul 19 2017 Vít Ondruch <vondruch@redhat.com> - 1.7.2-1
c45d8a
- Update to Thin 1.7.2.
c45d8a
6ce517
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
6ce517
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6ce517
f402cd
* Tue Jan 10 2017 Vít Ondruch <vondruch@redhat.com> - 1.7.0-2
f402cd
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4
f402cd
edbbdf
* Fri Jul 29 2016 Jun Aruga <jaruga@redhat.com> - 1.7.0-1
edbbdf
- Update to Thin 1.7.0.
edbbdf
56af37
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-3
56af37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
56af37
dac0ed
* Fri Jan 08 2016 Vít Ondruch <vondruch@redhat.com> - 1.6.4-2
dac0ed
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
dac0ed
e29440
* Tue Oct 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.6.4-1
e29440
- Update to Thin 1.6.4.
e29440
ffd219
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-5
ffd219
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ffd219
b673dd
* Sun Jan 18 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.6.2-4
b673dd
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
b673dd
- Use rspec2 for now
b673dd
e3091e
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-3
e3091e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e3091e
323f8b
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-2
323f8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
323f8b
087f04
* Wed May 21 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.2-1
087f04
- Update to thin 1.6.2.
087f04
8b98ee
* Wed Apr 16 2014 Josef Stribny <jstribny@redhat.com> - 1.5.0-3
8b98ee
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1
8b98ee
97bf81
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-2
97bf81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
97bf81
5c5b69
* Thu Feb 28 2013 Vít Ondruch <vondruch@redhat.com> - 1.5.0-1
5c5b69
- Update to thin 1.5.0.
5c5b69
fb95e0
* Thu Feb 28 2013 Vít Ondruch <vondruch@redhat.com> - 1.3.1-6
fb95e0
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
fb95e0
1724bd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-5
1724bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1724bd
da006a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
da006a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
da006a
fec72c
* Wed Feb 01 2012 Vít Ondruch <vondruch@redhat.com> - 1.3.1-3
fec72c
- Rebuilt for Ruby 1.9.3.
fec72c
02302b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
02302b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
02302b
d15c68
* Fri Nov 25 2011 Vít Ondruch <vondruch@redhat.com> - 1.3.1-1
d15c68
- Update to Thin 1.3.1.
d15c68
Chris Lalancette b43612
* Tue Sep 06 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-10
Chris Lalancette b43612
- Bump the release so upgrades from F-16 work
Chris Lalancette b43612
Chris Lalancette 8286c7
* Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-3
Chris Lalancette 8286c7
- Move stats.html.erb to the main package (it is a runtime requirement)
Chris Lalancette 8286c7
Chris Lalancette 7c85dd
* Fri Jul 22 2011 Chris Lalancette <clalance@redhat.com> - 1.2.11-2
Chris Lalancette 7c85dd
- Fix the load path for thin_parser
Chris Lalancette 7c85dd
Michal Fojtik 63b03e
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.11-1
Michal Fojtik 63b03e
- Version bump
Michal Fojtik 63b03e
Michal Fojtik 5785e0
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-3
Michal Fojtik 5785e0
- Removed Rake dependency completely
Michal Fojtik 5785e0
Michal Fojtik e6a74a
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-2
Michal Fojtik e6a74a
- Fixed RSpec tests
Michal Fojtik e6a74a
Michal Fojtik 9cc9e7
* Tue Mar 01 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.8-1
Michal Fojtik 9cc9e7
- Updated to upstream version
Michal Fojtik 9cc9e7
339c9a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-2
339c9a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
339c9a
Michal Fojtik b3f35a
* Wed Sep 08 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.7-1
Michal Fojtik b3f35a
- Updated to upstream version
Michal Fojtik b3f35a
5c5b69
* Thu Feb 04 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-5
1b29e6
- Excluded ppc64 in tests (566401)
1b29e6
- Fixed Licensing
1b29e6
5c5b69
* Wed Feb 03 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-4
1b29e6
- Added rspec tests
1b29e6
- Fixed unwanted recompilation
1b29e6
- Fixed licensing
1b29e6
1b29e6
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-3
1b29e6
- Fixed description
1b29e6
1b29e6
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-2
1b29e6
- Build fixed
1b29e6
- Licence corrected
1b29e6
- Added missing requires
1b29e6
- Marked relevant files as documentation
1b29e6
1b29e6
* Tue Feb 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.2.5-1
1b29e6
- Initial package
1b29e6
1b29e6