]> git.pld-linux.org Git - packages/apache-mod_ruby.git/blob - apache-mod_ruby.spec
- adapterized
[packages/apache-mod_ruby.git] / apache-mod_ruby.spec
1 # TODO
2 # - fix build with apache/apr (apr_off_t)
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):    Modu³ Apache'a mod_ruby - zapewniaj±cy obs³ugê skryptów rubego przez serwer Apache
7 Name:           apache-%{mod_name}
8 Version:        1.2.4
9 Release:        1
10 License:        BSD-like
11 Group:          Networking/Daemons
12 Source0:        http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
13 # Source0-md5:  2b803c021297517eecb3dc6cf77b9534
14 Source1:        %{name}.conf
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.272
20 BuildRequires:  ruby-devel >= 1:1.6.4
21 Requires:       apache(modules-api) = %apache_modules_api
22 Requires:       ruby >= 1:1.6.4
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
27
28 %description
29 mod_ruby embeds the Ruby interpreter into the Apache web server,
30 allowing Ruby CGI scripts to be executed natively. These scripts will
31 start up much faster than without mod_ruby.
32
33 %description -l pl
34 mod_ruby zapewnia obs³ugê skryptów Ruby'ego bezpo¶rednio z poziomu
35 Apache'a, dziêki czemu bêd± siê one ³adowa³y znacznie szybciej ni¿
36 gdyby by³y wywo³ywane tradycyjnie.
37
38 %prep
39 %setup -q -n %{mod_name}-%{version}
40 %patch0 -p1
41
42 %build
43 ./configure.rb \
44         --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\
45         --with-apxs=%{apxs}
46 %{__make}
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,%{ruby_rubylibdir}}
52 install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
53 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_ruby.conf
54 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %post
60 if [ -f /var/lock/subsys/httpd ]; then
61         /etc/rc.d/init.d/httpd restart 1>&2
62 fi
63
64 %preun
65 if [ "$1" = "0" ]; then
66         if [ -f /var/lock/subsys/httpd ]; then
67                 /etc/rc.d/init.d/httpd restart 1>&2
68         fi
69 fi
70
71 %files
72 %defattr(644,root,root,755)
73 %doc COPYING ChangeLog README.en examples doc/*
74 %lang(ja) %doc README.ja
75 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
76 %attr(755,root,root) %{_pkglibdir}/*.so
77 %{ruby_rubylibdir}/*
This page took 0.073407 seconds and 4 git commands to generate.