1 %define mod_name mod_ruby
2 %define apxs /usr/sbin/apxs
3 Summary: Apache mod_ruby module - embeds the Ruby interpreter into the Apache web server
4 Summary(pl): Modu³ Apache'a mod_ruby - zapewniaj±cy obs³ugê skryptów rubego przez serwer Apache
5 Name: apache-%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
11 # Source0-md5: 2b803c021297517eecb3dc6cf77b9534
13 Patch0: %{name}-struct.patch
14 URL: http://www.modruby.net/
15 BuildRequires: %{apxs}
16 BuildRequires: apache-devel >= 2.0
17 BuildRequires: rpmbuild(macros) >= 1.268
18 BuildRequires: ruby-devel >= 1:1.6.4
19 Requires: apache(modules-api) = %apache_modules_api
20 Requires: ruby >= 1:1.6.4
21 %{?ruby_mod_ver_requires_eq}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
28 mod_ruby embeds the Ruby interpreter into the Apache web server,
29 allowing Ruby CGI scripts to be executed natively. These scripts will
30 start up much faster than without mod_ruby.
33 mod_ruby zapewnia obs³ugê skryptów Ruby'ego bezpo¶rednio z poziomu
34 Apache'a, dziêki czemu bêd± siê one ³adowa³y znacznie szybciej ni¿
35 gdyby by³y wywo³ywane tradycyjnie.
38 %setup -q -n %{mod_name}-%{version}
43 --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\
48 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,%{ruby_rubylibdir}}
51 install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
52 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf
53 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
56 rm -rf $RPM_BUILD_ROOT
59 %service -q httpd restart
62 if [ "$1" = "0" ]; then
63 %service -q httpd restart
67 %defattr(644,root,root,755)
68 %doc COPYING ChangeLog README.en examples doc/*
69 %lang(ja) %doc README.ja
70 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
71 %attr(755,root,root) %{_pkglibdir}/*.so