]>
Commit | Line | Data |
---|---|---|
bd41caad AG |
1 | %define mod_name mod_ruby |
2 | %define apxs /usr/sbin/apxs | |
7bea277e | 3 | Summary: Apache mod_ruby module - embeds the Ruby interpreter into the Apache web server |
e9f120cc | 4 | Summary(pl.UTF-8): Moduł Apache'a mod_ruby - zapewniający obsługę skryptów rubego przez serwer Apache |
bd41caad | 5 | Name: apache-%{mod_name} |
f39ce59d | 6 | Version: 1.2.5 |
3d502d8b | 7 | Release: 1 |
7bea277e | 8 | License: BSD-like |
940a6cb8 | 9 | Group: Networking/Daemons |
bd41caad | 10 | Source0: http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz |
a63b54e0 | 11 | # Source0-md5: 3c867008bd6518c1fec395d9040cd964 |
bd41caad AG |
12 | Source1: %{name}.conf |
13 | Patch0: %{name}-struct.patch | |
14 | URL: http://www.modruby.net/ | |
10b7e4e2 | 15 | BuildRequires: apache-apxs >= 2.0 |
a70c7ba3 | 16 | BuildRequires: apache-devel >= 2.0 |
ff01f49d | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
7d3f8d7d | 18 | BuildRequires: ruby-devel >= 1:1.6.4 |
5e053f2a | 19 | Requires: apache(modules-api) = %apache_modules_api |
192806ed | 20 | Requires: ruby >= 1:1.6.4 |
56ff64c0 | 21 | %{?ruby_mod_ver_requires_eq} |
7bea277e | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
bd41caad | 23 | |
5e053f2a ER |
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
25 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
6092531b | 26 | |
bd41caad AG |
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 | ||
274622d5 JR |
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. | |
bd41caad AG |
36 | |
37 | %prep | |
38 | %setup -q -n %{mod_name}-%{version} | |
39 | %patch0 -p1 | |
40 | ||
41 | %build | |
7bea277e | 42 | ./configure.rb \ |
052f3e6c | 43 | --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\ |
7bea277e | 44 | --with-apxs=%{apxs} |
bd41caad AG |
45 | %{__make} |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
bd41caad | 49 | |
5e053f2a | 50 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,%{ruby_rubylibdir}} |
bd41caad | 51 | install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so |
f39ce59d | 52 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf |
3d502d8b | 53 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} |
54 | ||
bd41caad | 55 | %clean |
7bea277e | 56 | rm -rf $RPM_BUILD_ROOT |
bd41caad AG |
57 | |
58 | %post | |
ff01f49d | 59 | %service -q httpd restart |
bd41caad | 60 | |
1217a566 | 61 | %postun |
bd41caad | 62 | if [ "$1" = "0" ]; then |
ff01f49d | 63 | %service -q httpd restart |
bd41caad | 64 | fi |
bd41caad AG |
65 | |
66 | %files | |
67 | %defattr(644,root,root,755) | |
7bea277e JB |
68 | %doc COPYING ChangeLog README.en examples doc/* |
69 | %lang(ja) %doc README.ja | |
5e053f2a | 70 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf |
940a6cb8 | 71 | %attr(755,root,root) %{_pkglibdir}/*.so |
3d502d8b | 72 | %{ruby_rubylibdir}/* |