]> git.pld-linux.org Git - packages/apache1-mod_xslt.git/blob - apache1-mod_xslt.spec
- update config dir macro
[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.UTF-8):      Moduł do udostępniania dokumentów XML
9 Name:           apache1-mod_%{mod_name}
10 Version:        1.1
11 Release:        1.3
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:  apache1-devel >= 1.3.39
23 BuildRequires:  rpmbuild(macros) >= 1.268
24 BuildRequires:  sablotron-devel
25 Requires:       apache1(EAPI)
26 Requires:       expat
27 Requires:       sablotron
28 Obsoletes:      apache-mod_xslt <= 1.1
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
32 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
33
34 %description
35 mod_xslt is a simple Apache module to serve XML based content. Data is
36 stored in XML files on the server. The user requests the XML file and
37 the translation method via a url such as this:
38 http://localhost/sourcefile.html. The module will parse this URL into
39 a XML source file and an XSL source file. In the example above, the
40 XML file will be sourcefile.xml. The module will open sourcefile.xml
41 and determine its DOCTYPE. Based on the DOCTYPE, the XSL file will be
42 opened. Should the DOCTYPE be "tutorial", the XSL file opened would be
43 tutorial_html.xsl. The content-type returned to the browser is
44 text/html. The translation occurs transparently to the user.
45
46 %description -l pl.UTF-8
47 mod_xslt jest prostym modułem Apache do udostępniania dokumentów XML.
48 Dane są zapisane w plikach XML na serwerze. Użytkownik żąda pliku XML
49 i tłumaczenia poprzez URL w stylu http://localhost/sourcefile.html.
50 Moduł zamienia ten URL na pliki źródłowe XML i XSL. W tym przykładzie
51 plikiem XML będzie sourcefile.xml. Moduł otworzy plik sourcefile.xml i
52 określi DOCTYPE, na podstawie którego otworzy odpowiedni plik XSL.
53 Jeżeli DOCTYPE jest "tutorial", plikiem XSL będzie tutorial_html.xsl.
54 Następnie moduł dokona przetwarzania pliku XML za pomocą arkusza XSLT
55 i zwróci przeglądarce powstały w ten sposób text/html. Cały proces
56 odbywa się w sposób niewidoczny dla użytkownika.
57
58 %prep
59 %setup -q -n mod%{mod_name}
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63 %patch3 -p1
64
65 %build
66 %{__make} \
67         APXS=%{apxs} \
68         CFLAGS="%{rpmcflags} -DEAPI"
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
73
74 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
75 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 %service -q apache restart
82
83 %postun
84 if [ "$1" = "0" ]; then
85         %service -q apache restart
86 fi
87
88 %files
89 %defattr(644,root,root,755)
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
91 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.059663 seconds and 3 git commands to generate.