2 # - update to apache 2.2 (build fails)
3 %define mod_name proxy_html
4 %define apxs /usr/sbin/apxs
5 Summary: mod_proxy_html - additional proxy module for rewriting HTML links
6 Summary(pl.UTF-8): mod_proxy_html - dodatkowy moduł proxy do przepisywania odnośników HTML
7 Name: apache-mod_%{mod_name}
11 Group: Networking/Daemons/HTTP
12 Source0: http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c
13 # Source0-md5: b1211dff5343d75ac376ef836557f11f
14 URL: http://apache.webthing.com/mod_proxy_html/
15 BuildRequires: %{apxs}
16 BuildRequires: apache-devel >= 2.0.44
17 BuildRequires: apr-devel >= 1:0.9.4-1
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: libxml2-devel >= 2.5.10
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires: apache(modules-api) = %apache_modules_api
23 Requires: apache-mod_proxy
24 Requires: libxml2 >= 2.5.10
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
31 mod_proxy_html is additional proxy module for rewriting HTML links so
32 that they don't break in a reverse proxy.
34 %description -l pl.UTF-8
35 mod_proxy_html to dodatkowy moduł proxy do przepisywania odnośników
36 HTML w ten sposób, by nie były uszkadzane przez odwrotne proxy.
44 -c -o mod_%{mod_name}.la \
45 $(%{_bindir}/xml2-config --cflags --libs) \
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
52 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/35_mod_%{mod_name}.conf
54 LoadModule proxy_html_module modules/mod_proxy_html.so
56 # You will find configuration instructions here:
57 # http://apache.webthing.com/mod_proxy_html/config.html
61 rm -rf $RPM_BUILD_ROOT
64 %service -q httpd restart
67 if [ "$1" = "0" ]; then
68 %service -q httpd restart
72 %defattr(644,root,root,755)
73 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
74 %attr(755,root,root) %{_pkglibdir}/*.so