2 # - apache 2.4 patch https://code.google.com/p/mod-spdy/issues/detail?id=64
3 # and a fork (due lack of response in upstream): https://github.com/eousphoros/mod-spdy
4 # - donated to asf http://googledevelopers.blogspot.com/2014/06/modspdy-is-now-apache-project.html
5 # whose repo is at https://svn.apache.org/repos/asf/httpd/mod_spdy/trunk/
8 %bcond_with werror # build with "-Werror" enabled
11 %define apxs %{_sbindir}/apxs
12 Summary: Apache module to enable SPDY support
13 Name: apache-mod_%{mod_name}
18 Source0: mod-spdy-%{version}.tar.xz
19 # Source0-md5: 35770e4855b2953440be5a56d9da3fa4
20 Source1: get-source.sh
23 Patch1: log-constants.patch
24 Patch2: apache2.4.patch
25 Patch3: system-zlib.patch
26 URL: http://code.google.com/p/mod-spdy/
27 BuildRequires: %{apxs}
28 BuildRequires: apache-devel >= 2.2
29 BuildRequires: tar >= 1:1.22
31 Requires: apache(modules-api) = %apache_modules_api
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
35 %define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
36 %define _sysconfdir %{_pkgrootdir}/conf.d
39 mod_spdy is an Apache module that allows an Apache server to support
40 the SPDY protocol for serving HTTP resources.
43 %setup -q -n mod-spdy-%{version}
52 %{__python} build/gyp_chromium \
56 %{!?with_werror:-Dwerror=} \
58 -Duse_system_apache_dev=1 \
59 -Duse_system_libjpeg=1 \
60 -Duse_system_libpng=1 \
61 -Duse_system_opencv=1 \
63 -Dsystem_include_path_apr=%{_includedir}/apr \
64 -Dsystem_include_path_aprutil=%{_includedir}/apr-util \
65 -Dsystem_include_path_httpd=%{_includedir}/apache \
69 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
70 %{?with_verbose:V=1} \
75 LINK.host="%{__cxx}" \
76 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
77 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
84 out=out/%{!?debug:Release}%{?debug:Debug}
85 install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
87 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
88 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
92 rm -rf $RPM_BUILD_ROOT
95 %service -q httpd restart
98 if [ "$1" = "0" ]; then
99 %service -q httpd restart
103 %defattr(644,root,root,755)
104 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
105 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so