]>
Commit | Line | Data |
---|---|---|
fc6d7217 | 1 | # |
9882a031 ER |
2 | # Conditional build: |
3 | %bcond_without ipv6 # disable IPv6 support | |
e27d3d4f ER |
4 | %bcond_without tests # do not perform "make test" |
5 | ||
27c146b7 ER |
6 | %define mod_name rpaf |
7 | %define apxs %{_sbindir}/apxs1 | |
76305c57 | 8 | Summary: Reverse proxy add forward module for Apache |
238fefaa | 9 | Summary(pl.UTF-8): Moduł Apache'a dodający przekazywanie dla odwrotnych proxy |
27c146b7 | 10 | Name: apache1-mod_%{mod_name} |
969dab64 | 11 | Version: 0.6 |
e27d3d4f | 12 | Release: 2 |
27c146b7 ER |
13 | License: Apache |
14 | Group: Networking/Daemons | |
ee882fac | 15 | Source0: http://stderr.net/apache/rpaf/download/mod_rpaf-%{version}.tar.gz |
969dab64 | 16 | # Source0-md5: ba2b89274e1dd4c0f96f8d034fa305b1 |
27c146b7 | 17 | Source1: %{name}.conf |
969dab64 | 18 | Patch0: mod_rpaf_degtine.patch |
e27d3d4f | 19 | Patch1: tests.patch |
27c146b7 | 20 | URL: http://stderr.net/apache/rpaf/ |
6cfb4223 | 21 | BuildRequires: apache1-devel >= 1.3.39 |
9882a031 | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
f90f2dda | 23 | Requires: apache1(EAPI) |
eb5d1321 | 24 | Provides: apache(mod_rpaf) |
e27d3d4f ER |
25 | %if %{with ipv6} |
26 | BuildRequires: apache1(ipv6)-devel | |
27 | Requires: apache1(ipv6) | |
28 | %else | |
29 | BuildConflicts: apache1(ipv6)-devel | |
30 | Conflicts: apache1(ipv6) | |
31 | %endif | |
32 | %if %{with tests} | |
33 | BuildRequires: apache1-base | |
34 | BuildRequires: apache1-mod_alias | |
35 | BuildRequires: apache1-mod_cgi | |
36 | BuildRequires: apache1-mod_log_config | |
37 | BuildRequires: apache1-mod_mime | |
38 | BuildRequires: apache1-mod_rewrite | |
39 | BuildRequires: perl-libwww | |
40 | %endif | |
27c146b7 ER |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
43 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
44 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
45 | ||
46 | %description | |
47 | rpaf is for backend Apache servers what mod_proxy_add_forward is for | |
48 | frontend Apache servers. It does excactly the opposite of | |
de142cd5 JB |
49 | mod_proxy_add_forward written by Ask Bjoern Hansen. It will also work |
50 | with mod_proxy in Apache starting with release 1.3.25. | |
51 | ||
aea7e3a1 | 52 | %description -l en.UTF-8 |
de142cd5 JB |
53 | rpaf is for backend Apache servers what mod_proxy_add_forward is for |
54 | frontend Apache servers. It does excactly the opposite of | |
aea7e3a1 | 55 | mod_proxy_add_forward written by Ask Bjørn Hansen. It will also work |
9f190657 JB |
56 | with mod_proxy in Apache starting with release 1.3.25. |
57 | ||
aea7e3a1 JR |
58 | %description -l pl.UTF-8 |
59 | rpaf jest dla backendowych serwerów Apache tym, czym | |
60 | mod_proxy_add_forward jest dla frontendowych. Wykonuje dokładnie | |
9f190657 | 61 | przeciwne operacje do mod_proxy_add_forward napisanego przez Aska |
aea7e3a1 | 62 | Bjoerna Hansena. Będzie także działać z mod_proxy w Apache'u począwszy |
9f190657 | 63 | od wersji 1.3.25. |
27c146b7 ER |
64 | |
65 | %prep | |
70256a6a ER |
66 | %setup -qc |
67 | mv mod_%{mod_name}-%{version}/* . | |
0b8fe183 | 68 | %patch0 -p1 |
e27d3d4f | 69 | %patch1 -p1 |
27c146b7 ER |
70 | |
71 | %build | |
72 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so | |
73 | ||
e27d3d4f ER |
74 | %if %{with tests} |
75 | ln -sf %{_libdir}/apache1 modules | |
76 | %{__make} test | |
77 | %endif | |
78 | ||
27c146b7 ER |
79 | %install |
80 | rm -rf $RPM_BUILD_ROOT | |
0bd3dc42 | 81 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
27c146b7 | 82 | |
e27d3d4f ER |
83 | install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
84 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/99_mod_%{mod_name}.conf | |
27c146b7 ER |
85 | |
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %post | |
9882a031 | 90 | %service -q apache restart |
27c146b7 | 91 | |
3df1e034 | 92 | %postun |
27c146b7 | 93 | if [ "$1" = "0" ]; then |
9882a031 | 94 | %service -q apache restart |
27c146b7 ER |
95 | fi |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
969dab64 | 99 | %doc README CHANGES |
76305c57 | 100 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
27c146b7 | 101 | %attr(755,root,root) %{_pkglibdir}/* |