]> git.pld-linux.org Git - packages/apache1-mod_xslt.git/blob - apache1-mod_xslt.spec
ee704a392c5367753dd72e713495719f77e3f9f1
[packages/apache1-mod_xslt.git] / apache1-mod_xslt.spec
1 # TODO
2 # - doesn't build
3 # mod_xslt.c:212: warning: passing arg 6 of `SablotRunProcessor' from incompatible pointer type
4 # ...
5 %define         mod_name        xslt
6 %define         apxs            /usr/sbin/apxs1
7 Summary:        Module to serve XML based content
8 Summary(pl):    Modu³ do udostêpniania dokumentów XML
9 Name:           apache1-mod_%{mod_name}
10 Version:        1.1
11 Release:        1.1
12 License:        GPL
13 Group:          Networking/Daemons
14 Source0:        http://dl.sourceforge.net/modxslt/mod_%{mod_name}-%{version}.tar.gz
15 # Source0-md5:  ce458a48f56cc857c808b71ec27f592d
16 Source1:        %{name}.conf
17 Patch0:         %{name}-includes.patch
18 Patch1:         %{name}-regex.patch
19 Patch2:         %{name}-make.patch
20 Patch3:         %{name}-module.patch
21 URL:            http://modxslt.userworld.com/
22 BuildRequires:  %{apxs}
23 BuildRequires:  apache1-devel >= 1.3.33-2
24 BuildRequires:  sablotron-devel
25 Requires(post,preun):   %{apxs}
26 Requires:       apache1 >= 1.3.33-2
27 Requires:       expat
28 Requires:       sablotron
29 Obsoletes:      apache-mod_%{mod_name} <= %{version}
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
33 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
34
35 %description
36 mod_xslt is a simple Apache module to serve XML based content. Data is
37 stored in XML files on the server. The user requests the XML file and
38 the translation method via a url such as this:
39 http://localhost/sourcefile.html. The module will parse this URL into
40 a XML source file and an XSL source file. In the example above, the
41 XML file will be sourcefile.xml. The module will open sourcefile.xml
42 and determine its DOCTYPE. Based on the DOCTYPE, the XSL file will be
43 opened. Should the DOCTYPE be "tutorial", the XSL file opened would be
44 tutorial_html.xsl. The content-type returned to the browser is
45 text/html. The translation occurs transparently to the user.
46
47 %description -l pl
48 mod_xslt jest prostym modu³em Apache do udostêpniania dokumentów XML.
49 Dane s± zapisane w plikach XML na serwerze. U¿ytkownik ¿±da pliku XML
50 i t³umaczenia poprzez URL w stylu http://localhost/sourcefile.html.
51 Modu³ zamienia ten URL na pliki ¼ród³owe XML i XSL. W tym przyk³adzie
52 plikiem XML bêdzie sourcefile.xml. Modu³ otworzy plik sourcefile.xml i
53 okre¶li DOCTYPE, na podstawie którego otworzy odpowiedni plik XSL.
54 Je¿eli DOCTYPE jest "tutorial", plikiem XSL bêdzie tutorial_html.xsl.
55 Nastêpnie modu³ dokona przetwarzania pliku XML za pomoc± arkusza XSLT
56 i zwróci przegl±darce powsta³y w ten sposób text/html. Ca³y proces
57 odbywa siê w sposób niewidoczny dla u¿ytkownika.
58
59 %prep
60 %setup -q -n mod%{mod_name}
61 %patch0 -p1
62 %patch1 -p1
63 %patch2 -p1
64 %patch3 -p1
65
66 %build
67 %{__make} \
68         APXS=%{apxs} \
69         CFLAGS="%{rpmcflags} -DEAPI"
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
74
75 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
76 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %post
82 if [ -f /var/lock/subsys/apache ]; then
83         /etc/rc.d/init.d/apache restart 1>&2
84 fi
85
86 %preun
87 if [ "$1" = "0" ]; then
88         if [ -f /var/lock/subsys/apache ]; then
89                 /etc/rc.d/init.d/apache restart 1>&2
90         fi
91 fi
92
93 %files
94 %defattr(644,root,root,755)
95 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
96 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.113206 seconds and 2 git commands to generate.