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}
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
12 URL: http://0pointer.de/lennart/projects/mod_mime_xattr/
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel >= 2.2
15 BuildRequires: attr-devel
16 BuildRequires: autoconf >= 2.57
17 BuildRequires: automake >= 1:1.9
19 BuildRequires: pkgconfig
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires: apache(modules-api) = %apache_modules_api
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
28 mod_mime_xattr is a module for the Apache HTTPD which may be used to
29 set a range of MIME properties of files served from a document tree
30 with extended attributes (EAs) as supported by the underlying file
33 The current version of mod_mime_xattr has support for Linux style EAs
34 which are supported by Linux 2.4 with the ACL/EA patches applied and
35 vanilla Linux 2.6. The following attributes may be used:
37 - user.mime_type: set the MIME type of a file explicitly. This
38 attribute is compatible with the shared MIME database specification as
39 published by freedesktop.org
40 - user.charset: set the charset used in a file
41 - user.mime_encoding: set the MIME encoding of a file (e.g. gzip)
42 - user.apache_handler: set the apache handler of a file explicitly
45 %setup -q -n mod_%{mod_name}-%{version}
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
55 install -p src/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
57 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
60 rm -rf $RPM_BUILD_ROOT
63 %service -q httpd restart
66 if [ "$1" = "0" ]; then
67 %service -q httpd restart
71 %defattr(644,root,root,755)
73 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
74 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so