]>
Commit | Line | Data |
---|---|---|
4e37a036 ER |
1 | %define mod_name mime_xattr |
2 | %define apxs %{_sbindir}/apxs | |
3 | Summary: Apache HTTPD module: mod_mime_xattr | |
4 | Name: apache-mod_%{mod_name} | |
5 | Version: 0.4 | |
6 | Release: 1 | |
7 | License: Apache v2.0 | |
8 | Group: Networking/Daemons/HTTP | |
9 | Source0: http://0pointer.de/lennart/projects/mod_mime_xattr/mod_mime_xattr-%{version}.tar.gz | |
10 | # Source0-md5: cf04dd8d8ce31a9690f7ddc4495f1b3b | |
11 | Source1: apache.conf | |
12 | URL: http://0pointer.de/lennart/projects/mod_mime_xattr/ | |
13 | BuildRequires: %{apxs} | |
14 | BuildRequires: apache-devel >= 2.2 | |
15 | BuildRequires: autoconf >= 2.57 | |
16 | BuildRequires: automake >= 1:1.9 | |
17 | BuildRequires: rpmbuild(macros) >= 1.268 | |
18 | Requires: apache(modules-api) = %apache_modules_api | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
22 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
23 | ||
24 | %description | |
25 | mod_mime_xattr is a module for the Apache HTTPD which may be used to | |
26 | set a range of MIME properties of files served from a document tree | |
27 | with extended attributes (EAs) as supported by the underlying file | |
28 | system. | |
29 | ||
30 | The current version of mod_mime_xattr has support for Linux style EAs | |
31 | which are supported by Linux 2.4 with the ACL/EA patches applied and | |
32 | vanilla Linux 2.6. The following attributes may be used: | |
33 | ||
34 | - user.mime_type: set the MIME type of a file explicitly. This | |
35 | attribute is compatible with the shared MIME database specification as | |
36 | published by freedesktop.org | |
37 | - user.charset: set the charset used in a file | |
38 | - user.mime_encoding: set the MIME encoding of a file (e.g. gzip) | |
39 | - user.apache_handler: set the apache handler of a file explicitly | |
40 | ||
41 | %prep | |
42 | %setup -q -n mod_%{mod_name}-%{version} | |
43 | ||
44 | %build | |
45 | %configure \ | |
46 | --with-apxs=%{apxs} | |
47 | %{__make} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
52 | install -p src/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
53 | ||
54 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
60 | %service -q httpd restart | |
61 | ||
62 | %postun | |
63 | if [ "$1" = "0" ]; then | |
64 | %service -q httpd restart | |
65 | fi | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc README | |
70 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf | |
71 | %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so |