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): mod_proxy_html - dodatkowy modu³ proxy do przepisywania odno¶ników HTML
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c
11 # Source0-md5: b1211dff5343d75ac376ef836557f11f
12 URL: http://apache.webthing.com/mod_proxy_html/
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel >= 2.0.44
15 BuildRequires: apr-devel >= 1:0.9.4-1
16 BuildRequires: autoconf
17 BuildRequires: automake
18 BuildRequires: libxml2-devel >= 2.5.10
19 Requires(post,preun): %{apxs}
20 Requires: apache >= 2.0.44
21 Requires: apache-mod_proxy >= 2.0.44
22 Requires: libxml2 >= 2.5.10
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _sysconfdir %(%{apxs} -q SYSCONFDIR)
26 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
29 mod_proxy_html is additional proxy module for rewriting HTML links
30 so that they don't break in a reverse proxy.
33 mod_proxy_html to dodatkowy modu³ proxy do przepisywania
41 -c -o mod_%{mod_name}.la \
42 $(%{_bindir}/xml2-config --cflags --libs) \
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
49 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
50 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/35_mod_%{mod_name}.conf
51 LoadModule proxy_html_module modules/mod_proxy_html.so
53 # You will find configuration instructions here:
54 # http://apache.webthing.com/mod_proxy_html/config.html
58 rm -rf $RPM_BUILD_ROOT
61 if [ -f /var/lock/subsys/httpd ]; then
62 /etc/rc.d/init.d/httpd restart 1>&2
66 if [ "$1" = "0" ]; then
67 if [ -f /var/lock/subsys/httpd ]; then
68 /etc/rc.d/init.d/httpd restart 1>&2
73 %defattr(644,root,root,755)
74 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*
75 %attr(755,root,root) %{_pkglibdir}/*