]> git.pld-linux.org Git - packages/apache-mod_xslt2.git/blob - apache-mod_xslt2.spec
379cea045574e5244f07d85e9b72b51550f5063b
[packages/apache-mod_xslt2.git] / apache-mod_xslt2.spec
1 # TODO
2 # - update to current apr, apu
3 %define         mod_name        xslt
4 %define         apxs            /usr/sbin/apxs
5 %define         snap    2004083000
6 Summary:        Module to serve XML based content
7 Summary(pl.UTF-8):      Moduł do udostępniania dokumentów XML
8 Name:           apache-mod_%{mod_name}2
9 Version:        1.3.6
10 Release:        1
11 License:        GPL
12 Group:          Networking/Daemons
13 Source0:        http://www.mod-xslt2.com/software/archive/%{snap}/modxslt-%{snap}.tar.gz
14 # Source0-md5:  8ebd2bc8ffcb555d001e4aad925103ed
15 Source1:        %{name}.conf
16 Patch0:         %{name}-makefile.patch
17 URL:            http://www.mod-xslt2.com/
18 BuildRequires:  %{apxs}
19 BuildRequires:  apache-devel >= 2.0
20 BuildRequires:  libxslt-devel
21 BuildRequires:  pcre-devel
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 Requires(post,postun):  /sbin/ldconfig
24 Requires:       apache(modules-api) = %apache_modules_api
25 Conflicts:      apache-mod_xslt
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30
31 %description
32 mod_xslt is a simple Apache module to serve XML based content. Data is
33 stored in XML files on the server. The user requests the XML file and
34 the translation method via a url such as this:
35 http://localhost/sourcefile.html. The module will parse this URL into
36 a XML source file and an XSL source file. In the example above, the
37 XML file will be sourcefile.xml. The module will open sourcefile.xml
38 and determine its DOCTYPE. Based on the DOCTYPE, the XSL file will be
39 opened. Should the DOCTYPE be "tutorial", the XSL file opened would be
40 tutorial_html.xsl. The content-type returned to the browser is
41 text/html. The translation occurs transparently to the user.
42
43 %description -l pl.UTF-8
44 mod_xslt jest prostym modułem Apache do udostępniania dokumentów XML.
45 Dane są zapisane w plikach XML na serwerze. Użytkownik żąda pliku XML
46 i tłumaczenia poprzez URL w stylu http://localhost/sourcefile.html.
47 Moduł zamienia ten URL na pliki źródłowe XML i XSL. W tym przykładzie
48 plikiem XML będzie sourcefile.xml. Moduł otworzy plik sourcefile.xml i
49 określi DOCTYPE, na podstawie którego otworzy odpowiedni plik XSL.
50 Jeżeli DOCTYPE jest "tutorial", plikiem XSL będzie tutorial_html.xsl.
51 Następnie moduł dokona przetwarzania pliku XML za pomocą arkusza XSLT
52 i zwróci przeglądarce powstały w ten sposób text/html. Cały proces
53 odbywa się w sposób niewidoczny dla użytkownika.
54
55 %package devel
56 Summary:        Development headers for mod_xslt2
57 Summary(pl.UTF-8):      Pliki nagłówkowe mod_xslt2
58 Group:          Development/Libraries
59 Requires:       %{name} = %{version}-%{release}
60
61 %description devel
62 development headers for mod_xslt2.
63
64 %package static
65 Summary:        Static mod_xslt2 library
66 Summary(pl.UTF-8):      Statyczna biblioteka mod_xslt2
67 Group:          Development/Libraries
68 Requires:       %{name}-devel = %{version}-%{release}
69
70 %description static
71 Static mod_xslt2 library.
72
73 %description static -l pl.UTF-8
74 Statyczna biblioteka mod_xslt2.
75
76 %prep
77 %setup -q -n mod%{mod_name}-%{snap}
78 %patch0 -p1
79
80 %build
81 %configure \
82         --with-apr-config=%{_bindir}/apr-1-config \
83         --with-apu-config=%{_bindir}/apu-1-config
84         --with-apxs=%{apxs}
85 %{__make}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
90
91 %{__make} install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod_%{mod_name}.conf
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 /sbin/ldconfig
101 %service -q httpd restart
102
103 %postun
104 /sbin/ldconfig
105 if [ "$1" = "0" ]; then
106         %service -q httpd restart
107 fi
108
109 %files
110 %defattr(644,root,root,755)
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
112 %attr(755,root,root) %{_pkglibdir}/*.so
113 %attr(755,root,root) %{_libdir}/libmodxslt0.so.*.*.*
114
115 %files devel
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_bindir}/*
118 %{_libdir}/*.la
119 %{_includedir}/modxslt0
120
121 %files static
122 %defattr(644,root,root,755)
123 %{_libdir}/*.a
This page took 0.333252 seconds and 2 git commands to generate.