]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blame - apache-mod_pagespeed.spec
- note the full error
[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
5# TODO
6# - c++ errors on 64bit/32bit gcc 4.5.1-4:
7# /usr/include/c++/4.5.1/bits/stl_map.h:87:5: instantiated from here
8# /usr/include/c++/4.5.1/bits/stl_pair.h:77:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type
9# ./net/instaweb/util/public/cache_interface.h:28:7: error: forward declaration of ‘struct net_instaweb::SharedString’
10# make[1]: *** [out/Release/obj.target/mod_pagespeed_test/net/instaweb/util/cache_fetcher_test.o] Error 1
55f3a9d4 11# http://pastebin.com/Eu88BPSQ
b6a5d8d0
ER
12# - sizeof(apr_int32_t) == sizeof(apr_int64_t) on 32bit (!?!):
13# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t':
14# third_party/apache/apr/src/strings/apr_snprintf.c:500:5: error: duplicate case value
15# third_party/apache/apr/src/strings/apr_snprintf.c:498:5: error: previously used here
16# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t_hex':
17# third_party/apache/apr/src/strings/apr_snprintf.c:671:5: error: duplicate case value
18# third_party/apache/apr/src/strings/apr_snprintf.c:669:5: error: previously used here
19# - possible sysdeps (uses release tags)
20# "serf_src": "http://serf.googlecode.com/svn/tags/0.3.1",
21# "apr_src": "http://svn.apache.org/repos/asf/apr/apr/tags/1.4.2",
22# "aprutil_src": "http://svn.apache.org/repos/asf/apr/apr-util/tags/1.3.9",
23# "apache_httpd_src": "http://svn.apache.org/repos/asf/httpd/httpd/tags/2.2.15",
24# "opencv_src": "https://code.ros.org/svn/opencv/tags/2.1",
25# "gflags_root": "http://google-gflags.googlecode.com/svn/tags/gflags-1.3/src",
26# "google_sparsehash_root": "http://google-sparsehash.googlecode.com/svn/tags/sparsehash-1.8.1/src",
27
08710a2f
ER
28%define svndate 20101104
29%define rel 0.1
30%define mod_name pagespeed
31%define apxs %{_sbindir}/apxs
32Summary: Apache module for rewriting web pages to reduce latency and bandwidth
33Name: apache-mod_%{mod_name}
34Version: 0.9.0.0
35Release: 0.1
36License: Apache v2.0
37Group: Networking/Daemons/HTTP
38# svn co http://src.chromium.org/svn/trunk/tools/depot_tools
39# install -d modpagespeed
40# cd modpagespeed
41# ../depot_tools/gclient config http://modpagespeed.googlecode.com/svn/trunk/src
42# ../depot_tools/gclient sync
b6a5d8d0
ER
43# Populate the LASTCHANGE file template as we no longer have the VCS files at this point
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
b6a5d8d0 55Suggests: apache-mod_deflate
08710a2f
ER
56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
59%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
60
61%description
62mod_pagespeed automates the application of those rules in an Apache
63server. HTML, CSS, JavaScript, and images are changed dynamically
64during the web serving process, so that the best practices recommended
65by Page Speed can be used without having to change the way the web
66site is maintained.
67
68%prep
69%setup -q -n modpagespeed
70
b6a5d8d0
ER
71cat > apache.conf <<EOF
72LoadModule %{mod_name}_module modules/mod_%{mod_name}.so > apache.conf
73
74$(cat src/install/common/pagespeed.conf.template)
75EOF
76
08710a2f
ER
77%build
78cat > Makefile <<'EOF'
79default:
80 $(MAKE) -C src \
81 BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
82 %{?with_verbose:V=1} \
83 CC="%{__cc}" \
84 CXX="%{__cxx}" \
85 CC.host="%{__cc}" \
86 CXX.host="%{__cxx}" \
87 LINK.host="%{__cxx}" \
88 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
89 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
90EOF
91%{__make}
92
93%install
94rm -rf $RPM_BUILD_ROOT
95install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
96install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
b6a5d8d0 97cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
08710a2f
ER
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%post
103%service -q httpd restart
104
105%postun
106if [ "$1" = "0" ]; then
107 %service -q httpd restart
108fi
109
110%files
111%defattr(644,root,root,755)
08710a2f 112%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
b6a5d8d0 113%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.074266 seconds and 4 git commands to generate.