3 %bcond_with werror # build with "-Werror" enabled
6 %define apxs %{_sbindir}/apxs
7 Summary: Apache 2 module to enable SPDY support
8 Name: apache-mod_%{mod_name}
13 Source0: mod-spdy-%{version}.tar.xz
14 # Source0-md5: 35770e4855b2953440be5a56d9da3fa4
15 Source1: get-source.sh
18 Patch1: log-constants.patch
19 Patch2: apache2.4.patch
20 URL: http://code.google.com/p/mod-spdy/
21 BuildRequires: %{apxs}
22 BuildRequires: apache-devel >= 2.2
23 BuildRequires: tar >= 1:1.22
25 Requires: apache(modules-api) = %apache_modules_api
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30 %define _sysconfdir %{_pkgrootdir}/conf.d
33 mod_spdy is an Apache module that allows an Apache server to support
34 the SPDY protocol for serving HTTP resources.
37 %setup -q -n mod-spdy-%{version}
45 %{__python} build/gyp_chromium \
49 %{!?with_werror:-Dwerror=} \
51 -Duse_system_apache_dev=1 \
52 -Duse_system_libjpeg=1 \
53 -Duse_system_libpng=1 \
54 -Duse_system_opencv=1 \
56 -Dsystem_include_path_apr=%{_includedir}/apr \
57 -Dsystem_include_path_aprutil=%{_includedir}/apr-util \
58 -Dsystem_include_path_httpd=%{_includedir}/apache \
62 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
63 %{?with_verbose:V=1} \
68 LINK.host="%{__cxx}" \
69 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
70 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
77 out=out/%{!?debug:Release}%{?debug:Debug}
78 install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
80 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
81 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
85 rm -rf $RPM_BUILD_ROOT
88 %service -q httpd restart
91 if [ "$1" = "0" ]; then
92 %service -q httpd restart
96 %defattr(644,root,root,755)
97 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
98 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so