4 %define apxs %{_sbindir}/apxs
5 Summary: Apache implementation of shared dictionary comrpession over HTTP
6 Name: apache-mod_%{mod_name}
8 Release: %{svnrev}.%{rel}
10 Group: Networking/Daemons/HTTP
12 # svn co http://mod-sdch.googlecode.com/svn/trunk${revno:+@$revno} mod-sdch
13 # tar -cjf mod-sdch-$(svnversion mod-sdch).tar.bz2 --exclude-vcs mod-sdch
14 # ../dropin mod-sdch-$(svnversion mod-sdch).tar.bz2
15 Source0: mod-sdch-9.tar.bz2
18 URL: http://code.google.com/p/mod-sdch/
19 BuildRequires: %{apxs}
20 BuildRequires: apache-devel >= 2.2
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires: apache(modules-api) = %apache_modules_api
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
29 Shared Dictionary Compression over HTTP is a proposed modification to
32 This Apache module will initially attempt to prototype a reference
36 %setup -qn mod-%{mod_name}
39 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
44 install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
46 # module configuration
47 # - should contain LoadModule line
48 # - and directives must be between IfModule (so user could disable the module easily)
49 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
51 # or, if no directives needed, put just LoadModule line
52 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
53 $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
56 rm -rf $RPM_BUILD_ROOT
59 %service -q httpd restart
62 if [ "$1" = "0" ]; then
63 %service -q httpd restart
67 %defattr(644,root,root,755)
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
70 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so