2 %define apxs %{_sbindir}/apxs
3 Summary: Apache 2 module to enable SPDY support
4 Name: apache-mod_%{mod_name}
9 Source0: mod-spdy-%{version}.tar.xz
10 # Source0-md5: 35770e4855b2953440be5a56d9da3fa4
11 Source1: get-source.sh
14 Patch1: log-constants.patch
15 URL: http://code.google.com/p/mod-spdy/
16 BuildRequires: %{apxs}
17 BuildRequires: apache-devel >= 2.2
18 BuildRequires: tar >= 1:1.22
20 Requires: apache(modules-api) = %apache_modules_api
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
24 %define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
25 %define _sysconfdir %{_pkgrootdir}/conf.d
28 mod_spdy is an Apache module that allows an Apache server to support
29 the SPDY protocol for serving HTTP resources.
32 %setup -q -n mod-spdy-%{version}
39 %{__python} build/gyp_chromium \
44 -Duse_system_apache_dev=1 \
45 -Duse_system_libjpeg=1 \
46 -Duse_system_libpng=1 \
47 -Duse_system_opencv=1 \
49 -Dsystem_include_path_apr=%{_includedir}/apr \
50 -Dsystem_include_path_aprutil=%{_includedir}/apr-util \
51 -Dsystem_include_path_httpd=%{_includedir}/apache \
55 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
56 %{?with_verbose:V=1} \
61 LINK.host="%{__cxx}" \
62 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
63 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
70 out=out/%{!?debug:Release}%{?debug:Debug}
71 install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
73 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
74 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
78 rm -rf $RPM_BUILD_ROOT
81 %service -q httpd restart
84 if [ "$1" = "0" ]; then
85 %service -q httpd restart
89 %defattr(644,root,root,755)
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
91 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so