From b6a5d8d0cd49215c6b13830fcc11f17e1322d151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 4 Nov 2010 21:04:37 +0000 Subject: [PATCH] - add apache config - suggests deflate - note the errors (help needed here) Changed files: apache-mod_pagespeed.spec -> 1.2 --- apache-mod_pagespeed.spec | 53 ++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/apache-mod_pagespeed.spec b/apache-mod_pagespeed.spec index aeef961..0dbd77c 100644 --- a/apache-mod_pagespeed.spec +++ b/apache-mod_pagespeed.spec @@ -1,3 +1,29 @@ +# NOTE +# - use make < 3.82 (from th-obsolete) to hack on code, because 3.82 +# invalidates built objects and it's annoying to wait if all is recompiled +# each time you invoke make +# TODO +# - c++ errors on 64bit/32bit gcc 4.5.1-4: +# /usr/include/c++/4.5.1/bits/stl_map.h:87:5: instantiated from here +# /usr/include/c++/4.5.1/bits/stl_pair.h:77:11: error: ‘std::pair<_T1, _T2>::second’ has incomplete type +# ./net/instaweb/util/public/cache_interface.h:28:7: error: forward declaration of ‘struct net_instaweb::SharedString’ +# make[1]: *** [out/Release/obj.target/mod_pagespeed_test/net/instaweb/util/cache_fetcher_test.o] Error 1 +# - sizeof(apr_int32_t) == sizeof(apr_int64_t) on 32bit (!?!): +# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t': +# third_party/apache/apr/src/strings/apr_snprintf.c:500:5: error: duplicate case value +# third_party/apache/apr/src/strings/apr_snprintf.c:498:5: error: previously used here +# third_party/apache/apr/src/strings/apr_snprintf.c: In function 'conv_os_thread_t_hex': +# third_party/apache/apr/src/strings/apr_snprintf.c:671:5: error: duplicate case value +# third_party/apache/apr/src/strings/apr_snprintf.c:669:5: error: previously used here +# - possible sysdeps (uses release tags) +# "serf_src": "http://serf.googlecode.com/svn/tags/0.3.1", +# "apr_src": "http://svn.apache.org/repos/asf/apr/apr/tags/1.4.2", +# "aprutil_src": "http://svn.apache.org/repos/asf/apr/apr-util/tags/1.3.9", +# "apache_httpd_src": "http://svn.apache.org/repos/asf/httpd/httpd/tags/2.2.15", +# "opencv_src": "https://code.ros.org/svn/opencv/tags/2.1", +# "gflags_root": "http://google-gflags.googlecode.com/svn/tags/gflags-1.3/src", +# "google_sparsehash_root": "http://google-sparsehash.googlecode.com/svn/tags/sparsehash-1.8.1/src", + %define svndate 20101104 %define rel 0.1 %define mod_name pagespeed @@ -13,17 +39,19 @@ Group: Networking/Daemons/HTTP # cd modpagespeed # ../depot_tools/gclient config http://modpagespeed.googlecode.com/svn/trunk/src # ../depot_tools/gclient sync -# cd - +# Populate the LASTCHANGE file template as we no longer have the VCS files at this point +# (cd src/build && svnversion > LASTCHANGE.in) +# cd .. # tar -cjf modpagespeed-$(date +%Y%m%d).tar.bz2 --exclude-vcs modpagespeed # ../dropin modpagespeed-$(date +%Y%m%d).tar.bz2 & Source0: modpagespeed-%{svndate}.tar.bz2 -# Source0-md5: - -Source1: apache.conf +# Source0-md5: 1640f3c7226ffd3ba4a67f0064241495 URL: http://code.google.com/p/modpagespeed/ BuildRequires: %{apxs} BuildRequires: apache-devel >= 2.2 BuildRequires: rpmbuild(macros) >= 1.268 Requires: apache(modules-api) = %apache_modules_api +Suggests: apache-mod_deflate BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) @@ -39,6 +67,12 @@ site is maintained. %prep %setup -q -n modpagespeed +cat > apache.conf < apache.conf + +$(cat src/install/common/pagespeed.conf.template) +EOF + %build cat > Makefile <<'EOF' default: @@ -59,15 +93,7 @@ EOF rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} - -# module configuration -# - should contain LoadModule line -# - and directives must be between IfModule (so user could disable the module easily) -cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf - -# or, if no directives needed, put just LoadModule line -echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ - $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf +cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf %clean rm -rf $RPM_BUILD_ROOT @@ -82,6 +108,5 @@ fi %files %defattr(644,root,root,755) -%doc README %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf -%attr(755,root,root) %{_pkglibdir}/* +%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so -- 2.43.0