]> git.pld-linux.org Git - packages/apache-mod_spdy.git/blob - apache-mod_spdy.spec
apache 2.4 patch, builds now
[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 2 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 URL:            http://code.google.com/p/mod-spdy/
21 BuildRequires:  %{apxs}
22 BuildRequires:  apache-devel >= 2.2
23 BuildRequires:  tar >= 1:1.22
24 BuildRequires:  xz
25 Requires:       apache(modules-api) = %apache_modules_api
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define         _pkgrootdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30 %define         _sysconfdir     %{_pkgrootdir}/conf.d
31
32 %description
33 mod_spdy is an Apache module that allows an Apache server to support
34 the SPDY protocol for serving HTTP resources.
35
36 %prep
37 %setup -q -n mod-spdy-%{version}
38 %patch0 -p1
39 %patch1 -p1
40 %patch2 -p1
41
42 %build
43 CC="%{__cc}" \
44 CXX="%{__cxx}" \
45 %{__python} build/gyp_chromium \
46         --format=make \
47         --depth=. \
48         build/all.gyp \
49         %{!?with_werror:-Dwerror=} \
50         -Duse_openssl=1 \
51         -Duse_system_apache_dev=1 \
52         -Duse_system_libjpeg=1 \
53         -Duse_system_libpng=1 \
54         -Duse_system_opencv=1 \
55         -Duse_system_zlib=1 \
56         -Dsystem_include_path_apr=%{_includedir}/apr \
57         -Dsystem_include_path_aprutil=%{_includedir}/apr-util \
58         -Dsystem_include_path_httpd=%{_includedir}/apache \
59         %{nil}
60
61 %{__make} mod_spdy \
62         BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
63         %{?with_verbose:V=1} \
64         CC="%{__cc}" \
65         CXX="%{__cxx}" \
66         CC.host="%{__cc}" \
67         CXX.host="%{__cxx}" \
68         LINK.host="%{__cxx}" \
69         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
70         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
71         %{nil}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
76
77 out=out/%{!?debug:Release}%{?debug:Debug}
78 install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
79
80 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
81 LoadModule %{mod_name}_module   modules/mod_%{mod_name}.so
82 EOF
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %post
88 %service -q httpd restart
89
90 %postun
91 if [ "$1" = "0" ]; then
92         %service -q httpd restart
93 fi
94
95 %files
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
This page took 0.492708 seconds and 4 git commands to generate.