1 %define pkgname mongrel
2 Summary: Ruby webserver toolkit
3 Summary(pl.UTF-8): Toolkit języka Ruby dla serwera WWW
8 Group: Development/Libraries
9 Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
10 # Source0-md5: a37617eb48f0932cc32143b2d76c0d12
11 Patch0: %{name}-nogems.patch
12 Patch1: %{name}-ruby1.9.patch
13 Patch2: format-security.patch
14 URL: http://mongrel.rubyforge.org/
15 BuildRequires: dos2unix
16 BuildRequires: rpmbuild(macros) >= 1.277
17 BuildRequires: ruby-devel
18 BuildRequires: ruby-irb
19 BuildRequires: ruby-modules
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Ruby webserver toolkit.
25 %description -l pl.UTF-8
26 Toolkit języka Ruby dla serwera WWW.
29 Summary: HTML documentation for %{pkgname}
30 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
32 Requires: ruby >= 1:1.8.7-4
33 %if "%{_rpmversion}" >= "5"
38 HTML documentation for %{pkgname}.
40 %description rdoc -l pl.UTF-8
41 Dokumentacja w formacie HTML dla %{pkgname}.
44 Summary: ri documentation for %{pkgname}
45 Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname}
48 %if "%{_rpmversion}" >= "5"
53 ri documentation for %{pkgname}.
55 %description ri -l pl.UTF-8
56 Dokumentacji w formacie ri dla %{pkgname}.
60 %{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz
61 find -newer README -o -print | xargs touch --reference %{SOURCE0}
62 dos2unix examples/mongrel_simple_service.rb
67 find -name '*.rb' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
70 # passing CFLAGS breaks -fPIC parsing,
71 # patch mkmf module to be able to pass CC and OPTFLAGS
72 %{__ruby} setup.rb config \
76 --datadir=%{_datadir} \
78 --sysconfdir=%{_sysconfdir} \
79 --localstatedir=%{_localstatedir} \
80 --rbdir=%{ruby_rubylibdir} \
81 --sodir=%{ruby_archdir} \
82 --make-prog="%{__make} CC=\"%{__cc}\""
84 %{__ruby} setup.rb setup
88 rm -r ri/{IO,Kernel,RequestLog,TCPServer}
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}}
95 %{__ruby} setup.rb install \
96 --prefix=$RPM_BUILD_ROOT
98 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
99 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
102 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_bindir}/*
107 %{ruby_rubylibdir}/*.rb
108 %{ruby_rubylibdir}/mongrel
109 %attr(755,root,root) %{ruby_archdir}/*.so
112 %defattr(644,root,root,755)
113 %{ruby_rdocdir}/%{name}-%{version}
116 %defattr(644,root,root,755)
117 %{ruby_ridir}/Mongrel*