]>
Commit | Line | Data |
---|---|---|
2bf23fdd ER |
1 | # TODO |
2 | # - update to current apr, apu | |
760de7a1 | 3 | %define mod_name xslt |
c733ba18 | 4 | %define apxs /usr/sbin/apxs |
a8a5089e | 5 | %define snap 337e290 |
760de7a1 | 6 | Summary: Module to serve XML based content |
1ed018ea | 7 | Summary(pl.UTF-8): Moduł do udostępniania dokumentów XML |
760de7a1 | 8 | Name: apache-mod_%{mod_name}2 |
a8a5089e AG |
9 | Version: 1.4.1 |
10 | Release: 0.1 | |
760de7a1 | 11 | License: GPL |
932d32c9 | 12 | Group: Networking/Daemons/HTTP |
a8a5089e AG |
13 | Source0: https://github.com/ccontavalli/mod-xslt/tarball/v1.4.1#/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 71cbec1d497a3264633cc50dccc6c7a3 | |
760de7a1 | 15 | Source1: %{name}.conf |
16 | Patch0: %{name}-makefile.patch | |
17 | URL: http://www.mod-xslt2.com/ | |
4281ca40 | 18 | BuildRequires: %{apxs} |
2bf23fdd | 19 | BuildRequires: apache-devel >= 2.0 |
014f176b | 20 | BuildRequires: libxslt-devel |
d913c531 | 21 | BuildRequires: pcre-devel |
d10d39a3 | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
ab91a250 | 23 | Requires(post,postun): /sbin/ldconfig |
2bf23fdd | 24 | Requires: apache(modules-api) = %apache_modules_api |
2bf23fdd | 25 | Conflicts: apache-mod_xslt |
760de7a1 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
2bf23fdd | 28 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
c746243b | 29 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
760de7a1 | 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 | ||
5aeb65b3 JR |
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. | |
760de7a1 | 54 | |
55 | %package devel | |
d913c531 | 56 | Summary: Development headers for mod_xslt2 |
1ed018ea | 57 | Summary(pl.UTF-8): Pliki nagłówkowe mod_xslt2 |
d913c531 JB |
58 | Group: Development/Libraries |
59 | Requires: %{name} = %{version}-%{release} | |
760de7a1 | 60 | |
61 | %description devel | |
62 | development headers for mod_xslt2. | |
63 | ||
64 | %package static | |
d913c531 | 65 | Summary: Static mod_xslt2 library |
1ed018ea | 66 | Summary(pl.UTF-8): Statyczna biblioteka mod_xslt2 |
d913c531 JB |
67 | Group: Development/Libraries |
68 | Requires: %{name}-devel = %{version}-%{release} | |
760de7a1 | 69 | |
70 | %description static | |
d913c531 JB |
71 | Static mod_xslt2 library. |
72 | ||
5aeb65b3 | 73 | %description static -l pl.UTF-8 |
d913c531 | 74 | Statyczna biblioteka mod_xslt2. |
760de7a1 | 75 | |
76 | %prep | |
a8a5089e | 77 | %setup -q -n ccontavalli-mod-xslt-%{snap} |
760de7a1 | 78 | %patch0 -p1 |
79 | ||
80 | %build | |
2bf23fdd | 81 | %configure \ |
a8a5089e | 82 | --with-sapi=apache2 \ |
2bf23fdd | 83 | --with-apr-config=%{_bindir}/apr-1-config \ |
a8a5089e | 84 | --with-apu-config=%{_bindir}/apu-1-config \ |
2bf23fdd ER |
85 | --with-apxs=%{apxs} |
86 | %{__make} | |
760de7a1 | 87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
c746243b | 90 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} |
760de7a1 | 91 | |
a8a5089e | 92 | %{__make} -j1 install \ |
d913c531 | 93 | DESTDIR=$RPM_BUILD_ROOT |
760de7a1 | 94 | |
c746243b | 95 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/70_mod_%{mod_name}.conf |
760de7a1 | 96 | |
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post | |
d913c531 | 101 | /sbin/ldconfig |
d10d39a3 | 102 | %service -q httpd restart |
760de7a1 | 103 | |
e7a28ea6 | 104 | %postun |
ab91a250 | 105 | /sbin/ldconfig |
760de7a1 | 106 | if [ "$1" = "0" ]; then |
d10d39a3 | 107 | %service -q httpd restart |
760de7a1 | 108 | fi |
d913c531 | 109 | |
760de7a1 | 110 | %files |
111 | %defattr(644,root,root,755) | |
c746243b | 112 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
2bf23fdd | 113 | %attr(755,root,root) %{_pkglibdir}/*.so |
a8a5089e AG |
114 | %attr(755,root,root) %{_libdir}/libmodxslt1.so.*.*.* |
115 | %{_mandir}/man1/modxslt-config.1* | |
116 | %{_mandir}/man1/modxslt-parse.1* | |
117 | %{_mandir}/man1/modxslt-perror.1* | |
760de7a1 | 118 | |
119 | %files devel | |
d913c531 JB |
120 | %defattr(644,root,root,755) |
121 | %attr(755,root,root) %{_bindir}/* | |
760de7a1 | 122 | %{_libdir}/*.la |
a8a5089e | 123 | %{_includedir}/modxslt1 |
760de7a1 | 124 | |
125 | %files static | |
d913c531 | 126 | %defattr(644,root,root,755) |
760de7a1 | 127 | %{_libdir}/*.a |