]>
Commit | Line | Data |
---|---|---|
da41f258 ER |
1 | # TODO |
2 | # - doesn't build | |
3 | # mod_xslt.c:212: warning: passing arg 6 of `SablotRunProcessor' from incompatible pointer type | |
4 | # ... | |
138dba0f | 5 | %define mod_name xslt |
7b808378 | 6 | %define apxs /usr/sbin/apxs1 |
3d58c39e | 7 | Summary: Module to serve XML based content |
7922c293 | 8 | Summary(pl.UTF-8): Moduł do udostępniania dokumentów XML |
7b808378 | 9 | Name: apache1-mod_%{mod_name} |
138dba0f | 10 | Version: 1.1 |
60040a1f | 11 | Release: 1.2 |
3d58c39e | 12 | License: GPL |
078d6d7b JB |
13 | Group: Networking/Daemons |
14 | Source0: http://dl.sourceforge.net/modxslt/mod_%{mod_name}-%{version}.tar.gz | |
881b23a4 | 15 | # Source0-md5: ce458a48f56cc857c808b71ec27f592d |
65f8684c | 16 | Source1: %{name}.conf |
17 | Patch0: %{name}-includes.patch | |
18 | Patch1: %{name}-regex.patch | |
19 | Patch2: %{name}-make.patch | |
20 | Patch3: %{name}-module.patch | |
078d6d7b | 21 | URL: http://modxslt.userworld.com/ |
70ae9dab | 22 | BuildRequires: apache1-apxs |
da41f258 | 23 | BuildRequires: apache1-devel >= 1.3.33-2 |
3a852ba6 | 24 | BuildRequires: rpmbuild(macros) >= 1.268 |
3d58c39e | 25 | BuildRequires: sablotron-devel |
da41f258 | 26 | Requires: apache1 >= 1.3.33-2 |
078d6d7b JB |
27 | Requires: expat |
28 | Requires: sablotron | |
3a852ba6 | 29 | Obsoletes: apache-mod_xslt <= 1.1 |
138dba0f | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3d58c39e | 31 | |
da41f258 ER |
32 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
33 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
3d58c39e | 34 | |
35 | %description | |
72f23fae JB |
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: | |
7ca3f2e3 JB |
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 | |
72f23fae JB |
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. | |
3d58c39e | 46 | |
2b1fe5af JR |
47 | %description -l pl.UTF-8 |
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. | |
7ca3f2e3 | 58 | |
3d58c39e | 59 | %prep |
138dba0f | 60 | %setup -q -n mod%{mod_name} |
61 | %patch0 -p1 | |
ee54a2b5 | 62 | %patch1 -p1 |
1664a16c | 63 | %patch2 -p1 |
64 | %patch3 -p1 | |
3d58c39e | 65 | |
66 | %build | |
65f8684c | 67 | %{__make} \ |
68 | APXS=%{apxs} \ | |
69 | CFLAGS="%{rpmcflags} -DEAPI" | |
3d58c39e | 70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
da41f258 | 73 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
138dba0f | 74 | |
138dba0f | 75 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
da41f258 | 76 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf |
138dba0f | 77 | |
7ca3f2e3 JB |
78 | %clean |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
138dba0f | 81 | %post |
3a852ba6 | 82 | %service -q apache restart |
138dba0f | 83 | |
94f9a5c7 | 84 | %postun |
138dba0f | 85 | if [ "$1" = "0" ]; then |
3a852ba6 | 86 | %service -q apache restart |
138dba0f | 87 | fi |
3d58c39e | 88 | |
3d58c39e | 89 | %files |
90 | %defattr(644,root,root,755) | |
01372d1c | 91 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
7b808378 | 92 | %attr(755,root,root) %{_pkglibdir}/*.so |