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