2 Summary: Module to serve XML based content
3 Summary(pl): Modu³ do udostêpniania dokumentów XML
4 Name: apache-mod_%{mod_name}
8 URL: http://modxslt.userworld.com/
9 Source0: http://prdownloads.sourceforge.net/mod%{mod_name}/mod_%{mod_name}-%{version}.tar.gz
10 Source1: mod_%{mod_name}.conf
11 Patch0: mod_%{mod_name}-includes.patch
12 Group: Networking/Daemons
13 Group(de): Netzwerkwesen/Server
14 Group(pl): Sieciowe/Serwery
17 BuildRequires: apache-devel
18 BuildRequires: sablotron-devel
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _pkglibdir %(%{_sbindir}/apxs -q LIBEXECDIR)
22 %define _sysconfdir /etc/httpd
25 mod_xslt is a simple Apache module to serve XML based content. Data is
26 stored in XML files on the server. The user requests the XML file and
27 the translation method via a url such as this:
28 http://localhost/sourcefile.html The module will parse this URL into a
29 XML source file and an XSL source file. In the example above, the XML
30 file will be sourcefile.xml. The module will open sourcefile.xml and
31 determine its DOCTYPE. Based on the DOCTYPE, the XSL file will be
32 opened. Should the DOCTYPE be "tutorial", the XSL file opened would be
33 tutorial_html.xsl. The content-type returned to the browser is
34 text/html. The translation occurs transparently to the user.
37 %setup -q -n mod%{mod_name}
41 CFLAGS="%{rpmcflags}"; export CFLAGS
42 %{__make} APXS=%{_sbindir}/apxs
45 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
48 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
49 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mod_xslt.conf
52 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf; then
53 echo "Include /etc/httpd/mod_%{mod_name}.conf" >> /etc/httpd/httpd.conf
55 if [ -f /var/lock/subsys/httpd ]; then
56 /etc/rc.d/init.d/httpd restart 1>&2
60 if [ "$1" = "0" ]; then
61 grep -v -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf > \
62 /etc/httpd/httpd.conf.tmp
63 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
64 if [ -f /var/lock/subsys/httpd ]; then
65 /etc/rc.d/init.d/httpd restart 1>&2
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %attr(755,root,root) %{_pkglibdir}/*
75 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_%{mod_name}.conf