]> git.pld-linux.org Git - packages/apache-mod_ruby.git/blobdiff - apache-mod_ruby.spec
- converted to UTF-8
[packages/apache-mod_ruby.git] / apache-mod_ruby.spec
index d4b74f1885467262b866595ea0e6b653797b47f2..c6ee35bc87bb49afdb81186a5b5c8b4577abf4c5 100644 (file)
@@ -1,79 +1,72 @@
 %define                mod_name        mod_ruby
 %define        apxs            /usr/sbin/apxs
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define                _httpdconf      %{_sysconfdir}/httpd/httpd.conf
-%define                _modrubyconf    %{_sysconfdir}/httpd/mod_ruby.conf
-%define                _swap           /tmp/$$.swap
-Summary:       Apache module: mod_ruby - embeds the Ruby interpreter into the Apache web server
-Summary(pl):   Modu³ do Apache'a: mod_ruby - zapewnia obs³ugê skryptów rubego przez serwer Apache
+Summary:       Apache mod_ruby module - embeds the Ruby interpreter into the Apache web server
+Summary(pl.UTF-8):   Moduł Apache'a mod_ruby - zapewniający obsługę skryptów rubego przez serwer Apache
 Name:          apache-%{mod_name}
-Version:       1.0.7
-Release:       0.9
+Version:       1.2.5
+Release:       1
+License:       BSD-like
 Group:         Networking/Daemons
-License:       GPL
 Source0:       http://www.modruby.net/archive/%{mod_name}-%{version}.tar.gz
+# Source0-md5: 3c867008bd6518c1fec395d9040cd964
 Source1:       %{name}.conf
 Patch0:                %{name}-struct.patch
 URL:           http://www.modruby.net/
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Requires:      ruby >= 1.6.4
-Requires:      apache >= 1.3.3
-BuildRequires: ruby >= 1.6.4
 BuildRequires: %{apxs}
-BuildRequires: apache-devel >= 1.3.3
+BuildRequires: apache-devel >= 2.0
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: ruby-devel >= 1:1.6.4
+Requires:      apache(modules-api) = %apache_modules_api
+Requires:      ruby >= 1:1.6.4
+%{?ruby_mod_ver_requires_eq}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 mod_ruby embeds the Ruby interpreter into the Apache web server,
 allowing Ruby CGI scripts to be executed natively. These scripts will
 start up much faster than without mod_ruby.
 
-%description -l pl
-mod_ruby zapewnia obs³ugê skryptów Ruby'ego bezpo¶rednio z poziomu
-Apache'a, dziêki czemu bêd± siê one ³adowa³y znacnie szybciej ni¿
-gdyby by³y wowo³ywane tradycyjnie.
+%description -l pl.UTF-8
+mod_ruby zapewnia obsługę skryptów Ruby'ego bezpośrednio z poziomu
+Apache'a, dzięki czemu będą się one ładowały znacznie szybciej niż
+gdyby były wywoływane tradycyjnie.
 
 %prep
 %setup -q -n %{mod_name}-%{version}
 %patch0 -p1
 
 %build
-./configure.rb --with-apxs=%{apxs}
+./configure.rb \
+       --with-apr-includes='/usr/include/apr -I/usr/include/apr-util'\
+       --with-apxs=%{apxs}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-rm -rf %{buildroot}
-#%{__make} DESTDIR=$RPM_BUILD_ROOT install
 
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,%{ruby_rubylibdir}}
 install %{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/%{mod_name}.so
-
-# Install the config file
-install -d %{buildroot}%{_sysconfdir}/httpd/
-install %{SOURCE1} $RPM_BUILD_ROOT%{_modrubyconf}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir}
 
 %clean
-rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
-echo "Include %{_modrubyconf}" >> %{_httpdconf}
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n ruby %{_pkglibdir}/%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd restart
 fi
-cat %{_httpdconf} | grep -v "Include %{_modrubyconf}" > %{_swap}
-mv %{_swap} %{_httpdconf}
 
 %files
 %defattr(644,root,root,755)
-%doc COPYING ChangeLog README.ja README.en examples doc/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_ruby.conf
-%attr(755,root,root) %{_pkglibdir}/*
+%doc COPYING ChangeLog README.en examples doc/*
+%lang(ja) %doc README.ja
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
+%{ruby_rubylibdir}/*
This page took 0.067541 seconds and 4 git commands to generate.