]> git.pld-linux.org Git - packages/apache-mod_proxy_html.git/blob - apache-mod_proxy_html.spec
f759521f3293170f733336a8e6af8657a4f9fa22
[packages/apache-mod_proxy_html.git] / apache-mod_proxy_html.spec
1 %define         mod_name        proxy_html
2 %define         apxs            /usr/sbin/apxs
3
4 Summary:        mod_proxy_html - additional proxy module for rewriting HTML links
5 Summary(pl):    mod_proxy_html - dodatkowy modu³ proxy do przepisywania odno¶ników HTML
6 Name:           apache-mod_%{mod_name}
7 Version:        2.3
8 Release:        1
9 License:        GPL
10 Group:          Networking/Daemons
11 Source0:        http://apache.webthing.com/mod_proxy_html/mod_proxy_html.c
12 # Source0-md5:  b1211dff5343d75ac376ef836557f11f
13 URL:            http://apache.webthing.com/mod_proxy_html/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache-devel >= 2.0.44
16 BuildRequires:  apr-devel >= 1:0.9.4-1
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  libxml2-devel >= 2.5.10
20 Requires(post,preun):   %{apxs}
21 Requires:       apache >= 2.0.44
22 Requires:       apache-mod_proxy >= 2.0.44
23 Requires:       libxml2 >= 2.5.10
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         apache_moddir   %(%{apxs} -q LIBEXECDIR)
27
28 %description
29 mod_proxy_html is additional proxy module for rewriting HTML links
30 so that they don't break in a reverse proxy.
31
32 %description -l pl
33 mod_proxy_html to dodatkowy modu³ proxy do przepisywania
34 %prep
35 %setup -q -c -T
36
37 %build
38 cp %{SOURCE0} .
39 %{apxs} \
40         -c -o mod_%{mod_name}.so \
41         $(%{_bindir}/xml2-config --cflags --libs) \
42         -Wl,-shared \
43         mod_%{mod_name}.c
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{apache_moddir},/etc/httpd/httpd.conf}
48
49 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{apache_moddir}
50 cat <<EOF > $RPM_BUILD_ROOT/etc/httpd/httpd.conf/35_mod_%{mod_name}.conf
51 LoadModule proxy_html_module    modules/mod_proxy_html.so
52
53 # You will find configuration instructions here:
54 # http://apache.webthing.com/mod_proxy_html/config.html
55 EOF
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 if [ -f /var/lock/subsys/httpd ]; then
62         /etc/rc.d/init.d/httpd restart 1>&2
63 fi
64
65 %preun
66 if [ "$1" = "0" ]; then
67         if [ -f /var/lock/subsys/httpd ]; then
68                 /etc/rc.d/init.d/httpd restart 1>&2
69         fi
70 fi
71
72 %files
73 %defattr(644,root,root,755)
74 %config(noreplace) %verify(not size mtime md5) /etc/httpd/httpd.conf/*
75 %attr(755,root,root) %{apache_moddir}/*
This page took 0.130044 seconds and 3 git commands to generate.