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