]> git.pld-linux.org Git - packages/apache-mod_ruby.git/blob - apache-mod_ruby.spec
- initial import (work by Marcin Kurzyna <m.kurzyna (at) nius.waw.pl>)
[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         _httpdconf      %{_sysconfdir}/httpd/httpd.conf
5 %define         _modrubyconf    %{_sysconfdir}/httpd/mod_ruby.conf
6 %define         _swap           /tmp/$$.swap
7 Summary:        Apache module: mod_ruby - embeds the Ruby interpreter into the Apache web server
8 Summary(pl):    Modu³ do Apache'a: mod_ruby - zapewnia obs³ugê skryptów rubego przez serwer Apache
9 Name:           apache-%{mod_name}
10 Version:        1.0.7
11 Release:        0.9
12 Group:          Networking/Daemons
13 License:        GPL
14 Source0:        http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
15 Source1:        %{name}.conf
16 Patch0:         %{name}-struct.patch
17 URL:            http://www.modruby.net/
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Requires:       ruby >= 1.6.4
20 Requires:       apache >= 1.3.3
21 BuildRequires:  ruby >= 1.6.4
22 BuildRequires:  %{apxs}
23 BuildRequires:  apache-devel >= 1.3.3
24
25 %description
26 mod_ruby embeds the Ruby interpreter into the Apache web server,
27 allowing Ruby CGI scripts to be executed natively. These scripts will
28 start up much faster than without mod_ruby.
29
30 %description -l pl
31 mod_ruby zapewnia obs³ugê skryptów Ruby'ego bezpo¶rednio z poziomu
32 Apache'a, dziêki czemu bêd± siê one ³adowa³y znacnie szybciej ni¿
33 gdyby by³y wowo³ywane tradycyjnie.
34
35 %prep
36 %setup -q -n %{mod_name}-%{version}
37 %patch0 -p1
38
39 %build
40 ./configure.rb --with-apxs=%{apxs}
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 rm -rf %{buildroot}
46 #%{__make} DESTDIR=$RPM_BUILD_ROOT install
47
48 install -d $RPM_BUILD_ROOT%{_pkglibdir}
49 install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
50
51 # Install the config file
52 install -d %{buildroot}%{_sysconfdir}/httpd/
53 install %{SOURCE1} $RPM_BUILD_ROOT%{_modrubyconf}
54
55 %clean
56 rm -rf %{buildroot}
57
58 %post
59 %{apxs} -e -a -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
60 echo "Include %{_modrubyconf}" >> %{_httpdconf}
61 if [ -f /var/lock/subsys/httpd ]; then
62         /etc/rc.d/init.d/httpd restart 1>&2
63 fi
64
65 %preun
66 if [ "$1" = "0" ]; then
67         %{apxs} -e -A -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
68         if [ -f /var/lock/subsys/httpd ]; then
69                 /etc/rc.d/init.d/httpd restart 1>&2
70         fi
71 fi
72 cat %{_httpdconf} | grep -v "Include %{_modrubyconf}" > %{_swap}
73 mv %{_swap} %{_httpdconf}
74
75 %files
76 %defattr(644,root,root,755)
77 %doc COPYING ChangeLog README.ja README.en examples doc/*
78 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_ruby.conf
79 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.117705 seconds and 4 git commands to generate.