2 # - make it work with ruby 1.9, currently any request -> Sig11
3 %define mod_name mod_ruby
4 %define apxs /usr/sbin/apxs
5 Summary: Apache mod_ruby module - embeds the Ruby interpreter into the Apache web server
6 Summary(pl.UTF-8): Moduł Apache'a mod_ruby - zapewniający obsługę skryptów rubego przez serwer Apache
7 Name: apache-%{mod_name}
11 Group: Networking/Daemons/HTTP
12 Source0: http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
13 # Source0-md5: 5aae358c3c9f1bfa2554da9242289ab7
15 Patch0: %{name}-struct.patch
16 URL: http://www.modruby.net/
17 BuildRequires: %{apxs}
18 BuildRequires: apache-devel >= 2.0
19 BuildRequires: rpmbuild(macros) >= 1.268
20 BuildRequires: ruby-devel >= 1:1.6.4
21 Requires: apache(modules-api) = %apache_modules_api
22 Requires: ruby >= 1:1.6.4
23 %{?ruby_mod_ver_requires_eq}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
30 mod_ruby embeds the Ruby interpreter into the Apache web server,
31 allowing Ruby CGI scripts to be executed natively. These scripts will
32 start up much faster than without mod_ruby.
34 %description -l pl.UTF-8
35 mod_ruby zapewnia obsługę skryptów Ruby'ego bezpośrednio z poziomu
36 Apache'a, dzięki czemu będą się one ładowały znacznie szybciej niż
37 gdyby były wywoływane tradycyjnie.
40 %setup -q -n %{mod_name}-%{version}
45 --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{ruby_rubylibdir}}
52 install -p %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
53 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/70_mod_%{mod_name}.conf
54 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
57 rm -rf $RPM_BUILD_ROOT
60 %service -q httpd restart
63 if [ "$1" = "0" ]; then
64 %service -q httpd restart
68 %defattr(644,root,root,755)
69 %doc COPYING ChangeLog README.en examples doc/*
70 %lang(ja) %doc README.ja
71 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
72 %attr(755,root,root) %{_pkglibdir}/*.so