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