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