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