]>
Commit | Line | Data |
---|---|---|
966d1b83 PG |
1 | %define mod_name encoding |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Apache module: convert character encoding of request URLs | |
4 | Name: apache-mod_%{mod_name} | |
5 | %define _source_version 20021209 | |
6 | Version: 20040616 | |
7 | Release: 0.1 | |
8 | License: Apache or BSD-like? | |
9 | Group: Networking/Daemons | |
10 | Source0: http://webdav.todo.gr.jp/download/mod_%{mod_name}-%{_source_version}.tar.gz | |
11 | # Source0-md5: 489cbd9c7429baf45c4234c51cb2af23 | |
12 | Source1: http://webdav.todo.gr.jp/download/experimental/mod_%{mod_name}.c.apache2.%{version} | |
13 | # Source1-md5: 5015b7a38e16be8534d2edcc8614d00e | |
14 | #Source1: %{name}.conf | |
15 | #Source2: %{name}.logrotate | |
16 | Patch0: %{name}-iconv_h.patch | |
17 | URL: http://webdav.todo.gr.jp/ | |
18 | BuildRequires: %{apxs} | |
19 | BuildRequires: apache-devel >= 2.0.40 | |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
22 | BuildRequires: rpmbuild(macros) >= 1.268 | |
23 | Requires: apache(modules-api) = %apache_modules_api | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
27 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
28 | %define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs | |
29 | ||
30 | %description | |
31 | This module improves non-ascii filename interoperability of | |
32 | apache (and mod_dav). | |
33 | ||
34 | %prep | |
35 | #%setup -q -T -c -n mod_%{mod_name} | |
36 | %setup -q -n mod_%{mod_name}-%{_source_version} | |
37 | install %{SOURCE1} mod_%{mod_name}.c | |
38 | #%patch0 -p0 | |
39 | ||
40 | %build | |
41 | %{__autoconf} | |
42 | %{__aclocal} | |
43 | %{__automake} | |
44 | %configure \ | |
45 | --with-apxs=%{apxs} | |
46 | ||
47 | %{__make} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/etc/logrotate.d,%{_pkglogdir}} | |
52 | ||
53 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
54 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf | |
55 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
56 | ||
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %post | |
62 | %service -q httpd restart | |
63 | ||
64 | %postun | |
65 | if [ "$1" = "0" ]; then | |
66 | %service -q httpd restart | |
67 | fi | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc AUTHORS ChangeLog README* | |
72 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf | |
73 | #%attr(755,root,root) %{_pkglibdir}/*.so | |
74 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/* | |
75 | #%attr(640,root,root) %ghost %{_pkglogdir}/* |