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