]> git.pld-linux.org Git - packages/apache1-mod_xslt.git/blob - apache1-mod_xslt.spec
- added %{apxs} local macro to avoid adapter problems
[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:        2
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 Group(cs):      Sí»ové/Démoni
15 Group(da):      Netværks/Dæmoner
16 Group(de):      Netzwerkwesen/Server
17 Group(es):      Red/Servidores
18 Group(fr):      Réseau/Serveurs
19 Group(is):      Net/Púkar
20 Group(it):      Rete/Demoni
21 Group(no):      Nettverks/Daemoner
22 Group(pl):      Sieciowe/Serwery
23 Group(pt):      Rede/Servidores
24 Group(ru):      óÅÔØ/äÅÍÏÎÙ
25 Group(sl):      Omre¾ni/Stre¾niki
26 Group(sv):      Nätverk/Demoner
27 Group(uk):      íÅÒÅÖÁ/äÅÍÏÎÉ
28 Requires:       expat
29 Requires:       sablotron
30 BuildRequires:  %{apxs}
31 BuildRequires:  apache-devel
32 BuildRequires:  sablotron-devel
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
36 %define         _sysconfdir     /etc/httpd
37
38 %description
39 mod_xslt is a simple Apache module to serve XML based content. Data is
40 stored in XML files on the server. The user requests the XML file and
41 the translation method via a url such as this:
42 http://localhost/sourcefile.html. The module will parse this URL into
43 a XML source file and an XSL source file. In the example above, the
44 XML file will be sourcefile.xml. The module will open sourcefile.xml
45 and determine its DOCTYPE. Based on the DOCTYPE, the XSL file will be
46 opened. Should the DOCTYPE be "tutorial", the XSL file opened would be
47 tutorial_html.xsl. The content-type returned to the browser is
48 text/html. The translation occurs transparently to the user.
49
50 %description -l pl
51 mod_xslt jest prostym modu³em Apache do udostêpniania dokumentów XML.
52 Dane s± zapisane w plikach XML na serwerze. U¿ytkownik ¿±da pliku XML
53 i t³maczenia poprzez URL w stylu http://localhost/sourcefile.html.
54 Modu³ zamienia ten URL na pliki ¼ród³owe XML i XSL. W tym przyk³adzie
55 plikiem XML bêdzie sourcefile.xml. Modu³ otworzy plik sourcefile.xml i
56 okre¶li DOCTYPE, na podstawie którego otworzy odpowiedni plik XSL.
57 Je¿eli DOCTYPE jest "tutorial", plikiem XSL bêdzie tutorial_html.xsl.
58 Pole content-type zwrócone przegl±darce bêdzie zawiera³o text/html.
59 T³umaczenie jest przezroczyste dla u¿ytkownika.
60
61 %prep
62 %setup -q -n mod%{mod_name}
63 %patch0 -p1
64
65 %build
66 CFLAGS="%{rpmcflags} -DEAPI"; export CFLAGS
67 %{__make} APXS=%{apxs}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
72
73 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
74 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mod_xslt.conf
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post
80 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf; then
81         echo "Include /etc/httpd/mod_%{mod_name}.conf" >> /etc/httpd/httpd.conf
82 fi
83 if [ -f /var/lock/subsys/httpd ]; then
84         /etc/rc.d/init.d/httpd restart 1>&2
85 fi
86
87 %preun
88 if [ "$1" = "0" ]; then
89         grep -v -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf > \
90                 /etc/httpd/httpd.conf.tmp
91         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
92         if [ -f /var/lock/subsys/httpd ]; then
93                 /etc/rc.d/init.d/httpd restart 1>&2
94         fi
95 fi
96
97 %files
98 %defattr(644,root,root,755)
99 %attr(755,root,root) %{_pkglibdir}/*
100 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_%{mod_name}.conf
This page took 0.085289 seconds and 4 git commands to generate.