]>
Commit | Line | Data |
---|---|---|
1f57031c ER |
1 | # TODO |
2 | # - update to apache 2.2 (build fails) | |
b9a70d0d AM |
3 | %define mod_name proxy_html |
4 | %define apxs /usr/sbin/apxs | |
0576679a | 5 | Summary: mod_proxy_html - additional proxy module for rewriting HTML links |
8ca82993 | 6 | Summary(pl.UTF-8): mod_proxy_html - dodatkowy moduł proxy do przepisywania odnośników HTML |
b9a70d0d | 7 | Name: apache-mod_%{mod_name} |
45e40660 | 8 | Version: 3.0.1 |
b9a70d0d AM |
9 | Release: 1 |
10 | License: GPL | |
ac9b80d4 | 11 | Group: Networking/Daemons/HTTP |
f372c0f8 | 12 | Source0: http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c |
45e40660 | 13 | # Source0-md5: 6d38fbcd58e6e5cac246da3d1fcd22f4 |
b9a70d0d | 14 | URL: http://apache.webthing.com/mod_proxy_html/ |
7b9fe6b5 | 15 | BuildRequires: %{apxs} |
b9a70d0d AM |
16 | BuildRequires: apache-devel >= 2.0.44 |
17 | BuildRequires: apr-devel >= 1:0.9.4-1 | |
18 | BuildRequires: autoconf | |
19 | BuildRequires: automake | |
0576679a | 20 | BuildRequires: libxml2-devel >= 2.5.10 |
70f16785 | 21 | BuildRequires: rpmbuild(macros) >= 1.268 |
1f57031c | 22 | Requires: apache(modules-api) = %apache_modules_api |
2204716a | 23 | Requires: apache-mod_proxy |
0576679a | 24 | Requires: libxml2 >= 2.5.10 |
b9a70d0d AM |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
1f57031c ER |
27 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
28 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
b9a70d0d AM |
29 | |
30 | %description | |
d2bd06e3 ER |
31 | mod_proxy_html is additional proxy module for rewriting HTML links so |
32 | that they don't break in a reverse proxy. | |
b9a70d0d | 33 | |
8eb66b67 JR |
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. | |
d12ef0b3 | 37 | |
b9a70d0d AM |
38 | %prep |
39 | %setup -q -c -T | |
a70b71a2 | 40 | cp %{SOURCE0} . |
b9a70d0d AM |
41 | |
42 | %build | |
0576679a | 43 | %{apxs} \ |
6e502423 | 44 | -c -o mod_%{mod_name}.la \ |
0576679a | 45 | $(%{_bindir}/xml2-config --cflags --libs) \ |
f372c0f8 | 46 | mod_%{mod_name}.c |
b9a70d0d AM |
47 | |
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
ac09baea | 50 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} |
b9a70d0d | 51 | |
ac09baea | 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 | |
9f1dfc45 | 54 | LoadModule proxy_html_module modules/mod_proxy_html.so |
f372c0f8 JK |
55 | |
56 | # You will find configuration instructions here: | |
57 | # http://apache.webthing.com/mod_proxy_html/config.html | |
58 | EOF | |
b9a70d0d AM |
59 | |
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post | |
70f16785 | 64 | %service -q httpd restart |
b9a70d0d | 65 | |
7fd8fe83 | 66 | %postun |
b9a70d0d | 67 | if [ "$1" = "0" ]; then |
70f16785 | 68 | %service -q httpd restart |
b9a70d0d AM |
69 | fi |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
1f57031c ER |
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 |