1 %define mod_name proxy_html
2 %define apxs /usr/sbin/apxs
3 Summary: mod_proxy_html - additional proxy module for rewriting HTML links
4 Summary(pl.UTF-8): mod_proxy_html - dodatkowy moduł proxy do przepisywania odnośników HTML
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons/HTTP
10 Source0: http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c
11 # Source0-md5: 6d38fbcd58e6e5cac246da3d1fcd22f4
12 Patch0: format-security.patch
13 URL: http://apache.webthing.com/mod_proxy_html/
14 BuildRequires: %{apxs}
15 BuildRequires: apache-devel >= 2.0.44
16 BuildRequires: apr-devel >= 1:0.9.4-1
17 BuildRequires: autoconf
18 BuildRequires: automake
19 BuildRequires: libxml2-devel >= 2.5.10
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires: apache(modules-api) = %apache_modules_api
22 Requires: apache-mod_proxy
23 Requires: libxml2 >= 2.5.10
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
30 mod_proxy_html is additional proxy module for rewriting HTML links so
31 that they don't break in a reverse proxy.
33 %description -l pl.UTF-8
34 mod_proxy_html to dodatkowy moduł proxy do przepisywania odnośników
35 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}}
52 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/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}/*_mod_%{mod_name}.conf
74 %attr(755,root,root) %{_pkglibdir}/*.so