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