]>
Commit | Line | Data |
---|---|---|
b9a70d0d | 1 | %define mod_name proxy_html |
192c4c88 | 2 | %define apxs /usr/sbin/apxs |
0576679a | 3 | Summary: mod_proxy_html - additional proxy module for rewriting HTML links |
8ca82993 | 4 | Summary(pl.UTF-8): mod_proxy_html - dodatkowy moduł proxy do przepisywania odnośników HTML |
b9a70d0d | 5 | Name: apache-mod_%{mod_name} |
45e40660 | 6 | Version: 3.0.1 |
192c4c88 | 7 | Release: 4 |
b9a70d0d | 8 | License: GPL |
ac9b80d4 | 9 | Group: Networking/Daemons/HTTP |
f372c0f8 | 10 | Source0: http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c |
45e40660 | 11 | # Source0-md5: 6d38fbcd58e6e5cac246da3d1fcd22f4 |
192c4c88 | 12 | Patch0: format-security.patch |
b9a70d0d | 13 | URL: http://apache.webthing.com/mod_proxy_html/ |
7b9fe6b5 | 14 | BuildRequires: %{apxs} |
b9a70d0d AM |
15 | BuildRequires: apache-devel >= 2.0.44 |
16 | BuildRequires: apr-devel >= 1:0.9.4-1 | |
17 | BuildRequires: autoconf | |
18 | BuildRequires: automake | |
0576679a | 19 | BuildRequires: libxml2-devel >= 2.5.10 |
70f16785 | 20 | BuildRequires: rpmbuild(macros) >= 1.268 |
1f57031c | 21 | Requires: apache(modules-api) = %apache_modules_api |
2204716a | 22 | Requires: apache-mod_proxy |
0576679a | 23 | Requires: libxml2 >= 2.5.10 |
b9a70d0d AM |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
1f57031c | 26 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
e51111f3 | 27 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
b9a70d0d AM |
28 | |
29 | %description | |
d2bd06e3 ER |
30 | mod_proxy_html is additional proxy module for rewriting HTML links so |
31 | that they don't break in a reverse proxy. | |
b9a70d0d | 32 | |
8eb66b67 JR |
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. | |
d12ef0b3 | 36 | |
b9a70d0d AM |
37 | %prep |
38 | %setup -q -c -T | |
a70b71a2 | 39 | cp %{SOURCE0} . |
192c4c88 | 40 | %patch0 -p1 |
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 | |
e51111f3 | 50 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} |
b9a70d0d | 51 | |
ac09baea | 52 | install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
e51111f3 | 53 | cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/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) | |
e51111f3 | 73 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
1f57031c | 74 | %attr(755,root,root) %{_pkglibdir}/*.so |