]> git.pld-linux.org Git - packages/apache-mod_ruby.git/blob - apache-mod_ruby.spec
14bf26ab653a1f183758496be4f0f271c8834225
[packages/apache-mod_ruby.git] / apache-mod_ruby.spec
1 %define         mod_name        mod_ruby
2 %define         apxs            /usr/sbin/apxs
3 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
4 %define         _modrubyconf    %{_sysconfdir}/httpd/httpd.conf/70_mod_ruby.conf
5 %define ruby_archdir    %(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')
6 %define ruby_rubylibdir %(ruby -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')
7 Summary:        Apache mod_ruby module - embeds the Ruby interpreter into the Apache web server
8 Summary(pl):    Modu³ Apache'a mod_ruby - zapewniaj±cy obs³ugê skryptów rubego przez serwer Apache
9 Name:           apache-%{mod_name}
10 Version:        1.2.2
11 Release:        1
12 Group:          Networking/Daemons
13 License:        BSD-like
14 Source0:        http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
15 # Source0-md5:  786d740c84ec6aba73d0450b546b4642
16 Source1:        %{name}.conf
17 Patch0:         %{name}-struct.patch
18 URL:            http://www.modruby.net/
19 BuildRequires:  apache-devel >= 1.3.3
20 BuildRequires:  %{apxs}
21 BuildRequires:  ruby >= 1.6.4
22 Requires(post,preun):   %{apxs}
23 Requires:       apache >= 1.3.3
24 Requires:       ruby >= 1.6.4
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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 znacnie 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},%{ruby_rubylibdir}}
51 install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
52
53 # Install the config file
54 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf
55 install %{SOURCE1} $RPM_BUILD_ROOT%{_modrubyconf}
56
57 cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 if [ -f /var/lock/subsys/httpd ]; then
64         /etc/rc.d/init.d/httpd restart 1>&2
65 fi
66
67 %preun
68 if [ "$1" = "0" ]; then
69         if [ -f /var/lock/subsys/httpd ]; then
70                 /etc/rc.d/init.d/httpd restart 1>&2
71         fi
72 fi
73
74 %files
75 %defattr(644,root,root,755)
76 %doc COPYING ChangeLog README.en examples doc/*
77 %lang(ja) %doc README.ja
78 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/httpd.conf/70_mod_ruby.conf
79 %attr(755,root,root) %{_pkglibdir}/*
80 %{ruby_rubylibdir}/*
This page took 0.060674 seconds and 2 git commands to generate.