]>
Commit | Line | Data |
---|---|---|
c6d40ac0 ER |
1 | # NOTE: |
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 | |
de7f1b17 ER |
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/ | |
ce046aa5 ER |
6 | # |
7 | # Conditional build: | |
8 | %bcond_with werror # build with "-Werror" enabled | |
9 | ||
7e12550d ER |
10 | %define mod_name spdy |
11 | %define apxs %{_sbindir}/apxs | |
7139bb6c | 12 | Summary: Apache module to enable SPDY support |
7e12550d ER |
13 | Name: apache-mod_%{mod_name} |
14 | Version: 0.9.3.3 | |
1b8cc06f | 15 | Release: 1 |
7e12550d ER |
16 | License: Apache v2.0 |
17 | Group: Daemons | |
18 | Source0: mod-spdy-%{version}.tar.xz | |
19 | # Source0-md5: 35770e4855b2953440be5a56d9da3fa4 | |
20 | Source1: get-source.sh | |
21 | Source2: gclient.conf | |
22 | Patch0: gyp.patch | |
23 | Patch1: log-constants.patch | |
1b8cc06f | 24 | Patch2: apache2.4.patch |
7139bb6c | 25 | Patch3: system-zlib.patch |
7e12550d ER |
26 | URL: http://code.google.com/p/mod-spdy/ |
27 | BuildRequires: %{apxs} | |
28 | BuildRequires: apache-devel >= 2.2 | |
e3405b41 | 29 | BuildRequires: minizip-devel |
7e12550d ER |
30 | BuildRequires: tar >= 1:1.22 |
31 | BuildRequires: xz | |
32 | Requires: apache(modules-api) = %apache_modules_api | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
36 | %define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
37 | %define _sysconfdir %{_pkgrootdir}/conf.d | |
38 | ||
39 | %description | |
40 | mod_spdy is an Apache module that allows an Apache server to support | |
41 | the SPDY protocol for serving HTTP resources. | |
42 | ||
43 | %prep | |
44 | %setup -q -n mod-spdy-%{version} | |
45 | %patch0 -p1 | |
46 | %patch1 -p1 | |
1b8cc06f | 47 | %patch2 -p1 |
7139bb6c | 48 | %patch3 -p1 |
7e12550d ER |
49 | |
50 | %build | |
51 | CC="%{__cc}" \ | |
52 | CXX="%{__cxx}" \ | |
53 | %{__python} build/gyp_chromium \ | |
54 | --format=make \ | |
55 | --depth=. \ | |
56 | build/all.gyp \ | |
ce046aa5 | 57 | %{!?with_werror:-Dwerror=} \ |
7e12550d ER |
58 | -Duse_openssl=1 \ |
59 | -Duse_system_apache_dev=1 \ | |
60 | -Duse_system_libjpeg=1 \ | |
61 | -Duse_system_libpng=1 \ | |
62 | -Duse_system_opencv=1 \ | |
63 | -Duse_system_zlib=1 \ | |
64 | -Dsystem_include_path_apr=%{_includedir}/apr \ | |
65 | -Dsystem_include_path_aprutil=%{_includedir}/apr-util \ | |
66 | -Dsystem_include_path_httpd=%{_includedir}/apache \ | |
67 | %{nil} | |
68 | ||
69 | %{__make} mod_spdy \ | |
70 | BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ | |
71 | %{?with_verbose:V=1} \ | |
72 | CC="%{__cc}" \ | |
73 | CXX="%{__cxx}" \ | |
74 | CC.host="%{__cc}" \ | |
75 | CXX.host="%{__cxx}" \ | |
76 | LINK.host="%{__cxx}" \ | |
77 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
78 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
79 | %{nil} | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
84 | ||
85 | out=out/%{!?debug:Release}%{?debug:Debug} | |
86 | install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so | |
87 | ||
88 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF | |
89 | LoadModule %{mod_name}_module modules/mod_%{mod_name}.so | |
90 | EOF | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post | |
96 | %service -q httpd restart | |
97 | ||
98 | %postun | |
99 | if [ "$1" = "0" ]; then | |
100 | %service -q httpd restart | |
101 | fi | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf | |
106 | %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so |