%define mod_name transform
%define apxs /usr/sbin/apxs
Summary: Module to serve XML based content
-Summary(pl): Modu³ do udostêpniania dokumentów XML
+Summary(pl.UTF-8): Moduł do udostępniania dokumentów XML
Name: apache-mod_%{mod_name}
Version: 0.4.0
-Release: 1
+Release: 4
License: GPL v2+
Group: Networking/Daemons
Source0: http://www.outoforder.cc/downloads/mod_transform/mod_%{mod_name}-%{version}.tar.gz
# Source0-md5: a41ea16eeefb9b798186153b154a1219
-Source1: mod_%{mod_name}.conf
-URL: http://www.outoforder.cc/projects/apache/mod_transform/
+Source1: %{name}.conf
+URL: http://www.outoforder.cc/projects/apache/mod_transform/
BuildRequires: %{apxs}
+BuildRequires: apr-devel >= 1:1.0.0
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
-Requires(post,preun): %{apxs}
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: sed >= 4.0
+Requires: apache(modules-api) = %apache_modules_api
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _pkglibdir %(%{apxs} -q LIBEXECDIR)
-%define _sysconfdir %(%{apxs} -q SYSCONFDIR)
+%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
%description
mod_transform is a filter module that allows Apache 2.0 to do dynamic
XSL Transformations on either static XML documents, or XML documents
generated from another Apache module or CGI program.
-%description -l pl
-mod_transform to modu³ filtra umo¿liwiaj±cy serwerowi Apache 2.0
-wykonywaæ dynamiczne przekszta³cenia XML na statycznych dokumentach
-XML lub dokumentach XML generowanych przez inny modu³ Apache'a lub
+%description -l pl.UTF-8
+mod_transform to moduł filtra umożliwiający serwerowi Apache 2.0
+wykonywać dynamiczne przekształcenia XML na statycznych dokumentach
+XML lub dokumentach XML generowanych przez inny moduł Apache'a lub
program CGI.
%prep
%setup -q -n mod_%{mod_name}-%{version}
+sed -i -e "s:apr-config:apr-1-config:g" aclocal.m4 m4/apache.m4
+sed -i -e "s:apu-config:apu-1-config:g" aclocal.m4 m4/apache.m4
%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure
%{__make}
rm -rf $RPM_BUILD_ROOT
%post
-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
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
+ %service -q httpd restart
fi
%files
%defattr(644,root,root,755)
%doc TODO
-%attr(755,root,root) %{_pkglibdir}/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so