]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without ipv6 # disable IPv6 support | |
4 | %bcond_without tests # do not perform "make test" | |
5 | ||
6 | %define mod_name rpaf | |
7 | %define apxs %{_sbindir}/apxs1 | |
8 | Summary: Reverse proxy add forward module for Apache | |
9 | Summary(pl.UTF-8): Moduł Apache'a dodający przekazywanie dla odwrotnych proxy | |
10 | Name: apache1-mod_%{mod_name} | |
11 | Version: 0.6 | |
12 | Release: 2 | |
13 | License: Apache | |
14 | Group: Networking/Daemons | |
15 | Source0: http://stderr.net/apache/rpaf/download/mod_rpaf-%{version}.tar.gz | |
16 | # Source0-md5: ba2b89274e1dd4c0f96f8d034fa305b1 | |
17 | Source1: %{name}.conf | |
18 | Patch0: mod_rpaf_degtine.patch | |
19 | Patch1: tests.patch | |
20 | URL: http://stderr.net/apache/rpaf/ | |
21 | BuildRequires: apache1-devel >= 1.3.39 | |
22 | BuildRequires: rpmbuild(macros) >= 1.268 | |
23 | Requires: apache1(EAPI) | |
24 | Provides: apache(mod_rpaf) | |
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 | |
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 | |
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 | ||
52 | %description -l en.UTF-8 | |
53 | rpaf is for backend Apache servers what mod_proxy_add_forward is for | |
54 | frontend Apache servers. It does excactly the opposite of | |
55 | mod_proxy_add_forward written by Ask Bjørn Hansen. It will also work | |
56 | with mod_proxy in Apache starting with release 1.3.25. | |
57 | ||
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 | |
61 | przeciwne operacje do mod_proxy_add_forward napisanego przez Aska | |
62 | Bjoerna Hansena. Będzie także działać z mod_proxy w Apache'u począwszy | |
63 | od wersji 1.3.25. | |
64 | ||
65 | %prep | |
66 | %setup -qc | |
67 | mv mod_%{mod_name}-%{version}/* . | |
68 | %patch0 -p1 | |
69 | %patch1 -p1 | |
70 | ||
71 | %build | |
72 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so | |
73 | ||
74 | %if %{with tests} | |
75 | ln -sf %{_libdir}/apache1 modules | |
76 | %{__make} test | |
77 | %endif | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} | |
82 | ||
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 | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %post | |
90 | %service -q apache restart | |
91 | ||
92 | %postun | |
93 | if [ "$1" = "0" ]; then | |
94 | %service -q apache restart | |
95 | fi | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %doc README CHANGES | |
100 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf | |
101 | %attr(755,root,root) %{_pkglibdir}/* |