]>
Commit | Line | Data |
---|---|---|
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.UTF-8): Moduł Apache'a mod_ruby - zapewniający obsługę skryptów rubego przez serwer Apache | |
5 | Name: apache-%{mod_name} | |
6 | Version: 1.2.5 | |
7 | Release: 1 | |
8 | License: BSD-like | |
9 | Group: Networking/Daemons | |
10 | Source0: http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz | |
11 | # Source0-md5: 3c867008bd6518c1fec395d9040cd964 | |
12 | Source1: %{name}.conf | |
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) | |
23 | ||
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
25 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
26 | ||
27 | %description | |
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. | |
31 | ||
32 | %description -l pl.UTF-8 | |
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. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{mod_name}-%{version} | |
39 | %patch0 -p1 | |
40 | ||
41 | %build | |
42 | ./configure.rb \ | |
43 | --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\ | |
44 | --with-apxs=%{apxs} | |
45 | %{__make} | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
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} | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | %service -q httpd restart | |
60 | ||
61 | %postun | |
62 | if [ "$1" = "0" ]; then | |
63 | %service -q httpd restart | |
64 | fi | |
65 | ||
66 | %files | |
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 | |
72 | %{ruby_rubylibdir}/* |