]> git.pld-linux.org Git - packages/apache1-mod_xslt.git/blob - apache1-mod_xslt.spec
- added mod_xslt.conf
[packages/apache1-mod_xslt.git] / apache1-mod_xslt.spec
1 %define         mod_name        xslt
2 Summary:        Module to serve XML based content
3 Summary(pl):    Modu³ do udostêpniania dokumentów XML
4 Name:           apache-mod_%{mod_name}
5 Version:        1.1
6 Release:        1
7 License:        GPL
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
15 Requires:       expat
16 Requires:       sablotron
17 BuildRequires:  apache-devel
18 BuildRequires:  sablotron-devel
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{_sbindir}/apxs -q LIBEXECDIR)
22 %define         _sysconfdir     /etc/httpd
23
24 %description
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.
35
36 %prep
37 %setup -q -n mod%{mod_name}
38 %patch0 -p1
39
40 %build
41 CFLAGS="%{rpmcflags}"; export CFLAGS
42 %{__make} APXS=%{_sbindir}/apxs
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46
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
50
51 %post
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
54 fi
55 if [ -f /var/lock/subsys/httpd ]; then
56         /etc/rc.d/init.d/httpd restart 1>&2
57 fi
58
59 %preun
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
66         fi
67 fi
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
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
This page took 0.037671 seconds and 3 git commands to generate.