]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blame - apache-mod_pagespeed.spec
- R: apache-mod_authz_host for Order directive
[packages/apache-mod_pagespeed.git] / apache-mod_pagespeed.spec
CommitLineData
b6a5d8d0
ER
1# NOTE
2# - use make < 3.82 (from th-obsolete) to hack on code, because 3.82
3# invalidates built objects and it's annoying to wait if all is recompiled
4# each time you invoke make
eb743e9a 5# - http://wiki.mediatemple.net/w/(dv)_HOWTO:_Install_mod_pagespeed
b6a5d8d0
ER
6# TODO
7# - c++ errors on 64bit/32bit gcc 4.5.1-4:
8# /usr/include/c++/4.5.1/bits/stl_map.h:87:5: instantiated from here
9# /usr/include/c++/4.5.1/bits/stl_pair.h:77:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type
10# ./net/instaweb/util/public/cache_interface.h:28:7: error: forward declaration of ‘struct net_instaweb::SharedString’
11# make[1]: *** [out/Release/obj.target/mod_pagespeed_test/net/instaweb/util/cache_fetcher_test.o] Error 1
55f3a9d4 12# http://pastebin.com/Eu88BPSQ
b6a5d8d0
ER
13# - sizeof(apr_int32_t) == sizeof(apr_int64_t) on 32bit (!?!):
14# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t':
15# third_party/apache/apr/src/strings/apr_snprintf.c:500:5: error: duplicate case value
16# third_party/apache/apr/src/strings/apr_snprintf.c:498:5: error: previously used here
17# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t_hex':
18# third_party/apache/apr/src/strings/apr_snprintf.c:671:5: error: duplicate case value
19# third_party/apache/apr/src/strings/apr_snprintf.c:669:5: error: previously used here
20# - possible sysdeps (uses release tags)
21# "serf_src": "http://serf.googlecode.com/svn/tags/0.3.1",
22# "apr_src": "http://svn.apache.org/repos/asf/apr/apr/tags/1.4.2",
23# "aprutil_src": "http://svn.apache.org/repos/asf/apr/apr-util/tags/1.3.9",
24# "apache_httpd_src": "http://svn.apache.org/repos/asf/httpd/httpd/tags/2.2.15",
25# "opencv_src": "https://code.ros.org/svn/opencv/tags/2.1",
26# "gflags_root": "http://google-gflags.googlecode.com/svn/tags/gflags-1.3/src",
27# "google_sparsehash_root": "http://google-sparsehash.googlecode.com/svn/tags/sparsehash-1.8.1/src",
08710a2f 28%define svndate 20101104
08710a2f
ER
29%define mod_name pagespeed
30%define apxs %{_sbindir}/apxs
31Summary: Apache module for rewriting web pages to reduce latency and bandwidth
32Name: apache-mod_%{mod_name}
33Version: 0.9.0.0
06daee42 34Release: 0.3
08710a2f
ER
35License: Apache v2.0
36Group: Networking/Daemons/HTTP
e62ba6cb 37# wget -c http://src.chromium.org/svn/trunk/tools/depot_tools.tar.gz
eb743e9a 38# test -d depot_tools || tar xzf depot_tools.tar.gz
08710a2f
ER
39# install -d modpagespeed
40# cd modpagespeed
eb743e9a 41# test -f .gclient || ../depot_tools/gclient config http://modpagespeed.googlecode.com/svn/trunk/src
08710a2f 42# ../depot_tools/gclient sync
e62ba6cb 43# Populate the LASTCHANGE file template as we will not include VCS info in tarball
b6a5d8d0
ER
44# (cd src/build && svnversion > LASTCHANGE.in)
45# cd ..
08710a2f
ER
46# tar -cjf modpagespeed-$(date +%Y%m%d).tar.bz2 --exclude-vcs modpagespeed
47# ../dropin modpagespeed-$(date +%Y%m%d).tar.bz2 &
48Source0: modpagespeed-%{svndate}.tar.bz2
b6a5d8d0 49# Source0-md5: 1640f3c7226ffd3ba4a67f0064241495
08710a2f
ER
50URL: http://code.google.com/p/modpagespeed/
51BuildRequires: %{apxs}
52BuildRequires: apache-devel >= 2.2
53BuildRequires: rpmbuild(macros) >= 1.268
54Requires: apache(modules-api) = %apache_modules_api
e5171f2e 55Requires: apache-mod_authz_host
b6a5d8d0 56Suggests: apache-mod_deflate
08710a2f
ER
57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
06daee42
ER
60%define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
61%define _sysconfdir %{_pkgrootdir}/conf.d
62%define htdocsdir %(%{apxs} -q htdocsdir 2>/dev/null)
63%define cachedir %(%{apxs} -q proxycachedir 2>/dev/null)/mod_%{mod_name}
08710a2f
ER
64
65%description
66mod_pagespeed automates the application of those rules in an Apache
67server. HTML, CSS, JavaScript, and images are changed dynamically
68during the web serving process, so that the best practices recommended
69by Page Speed can be used without having to change the way the web
70site is maintained.
71
72%prep
e62ba6cb 73%setup -q -n modpagespeed
08710a2f
ER
74
75%build
eb743e9a 76# re-gen makefiles
e62ba6cb
ER
77cd src
78CC="%{__cc}" \
79CXX="%{__cxx}" \
80%{__python} build/gyp_chromium --format=make build/all.gyp
81cd ..
eb743e9a 82
e62ba6cb 83# makefile wrapper so we could just invoke "make" from shell
08710a2f
ER
84cat > Makefile <<'EOF'
85default:
86 $(MAKE) -C src \
87 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
88 %{?with_verbose:V=1} \
89 CC="%{__cc}" \
90 CXX="%{__cxx}" \
91 CC.host="%{__cc}" \
92 CXX.host="%{__cxx}" \
93 LINK.host="%{__cxx}" \
94 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
95 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
96EOF
97%{__make}
98
99%install
100rm -rf $RPM_BUILD_ROOT
06daee42
ER
101%{__make} -j1 -C src/install staging \
102 HOSTNAME=localhost \
103 APACHE_ROOT=%{_pkgrootdir} \
104 APACHE_MODULES=%{_pkglibdir} \
105 APACHE_DOC_ROOT=%{htdocsdir} \
106 MOD_PAGESPEED_FILE_ROOT=%{cachedir} \
107 STAGING_DIR=staging
108
109cd staging
08710a2f
ER
110install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
111install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
06daee42
ER
112install -d $RPM_BUILD_ROOT%{cachedir}/{cache,files}
113cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
114LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
115
116$(cat pagespeed.conf)
117EOF
08710a2f
ER
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%post
123%service -q httpd restart
124
125%postun
126if [ "$1" = "0" ]; then
127 %service -q httpd restart
128fi
129
130%files
131%defattr(644,root,root,755)
08710a2f 132%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
b6a5d8d0 133%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
06daee42
ER
134
135%dir %attr(710,root,http) %{cachedir}
136%dir %attr(770,root,http) %{cachedir}/cache
137%dir %attr(770,root,http) %{cachedir}/files
This page took 0.043736 seconds and 4 git commands to generate.