X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache-mod_pagespeed.spec;h=65f02b3d97b5d5ec30d99495695d51def3e9c970;hb=59548b66c21e48d0a9cce0f94fea7c755a987bb6;hp=fde6e9a53e4097237ed469724bdf58f8505f3945;hpb=2ddcd20034499ad4c72a16b52edb8fc9161661e9;p=packages%2Fapache-mod_pagespeed.git diff --git a/apache-mod_pagespeed.spec b/apache-mod_pagespeed.spec index fde6e9a..65f02b3 100644 --- a/apache-mod_pagespeed.spec +++ b/apache-mod_pagespeed.spec @@ -3,57 +3,54 @@ %bcond_without verbose # verbose build (V=1) # NOTE +# - relase notes: https://developers.google.com/speed/pagespeed/module/release_notes # - http://code.google.com/p/modpagespeed/wiki/HowToBuild # - http://wiki.mediatemple.net/w/(dv)_HOWTO:_Install_mod_pagespeed # TODO # - add unit tests running -# - use only source for modpagespeed if system headers are used (remove copies from tarball) # - possible sysdeps (uses release tags) # "serf_src": "http://serf.googlecode.com/svn/tags/0.3.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", # protobuf_lite -%if "%{pld_release}" == "ac" -# add suffix, but allow ccache, etc in ~/.rpmmacros -%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')} -%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')} -%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')} -%endif - %define mod_name pagespeed -%define apxs %{_sbindir}/apxs +%define apxs %{_sbindir}/apxs Summary: Apache module for rewriting web pages to reduce latency and bandwidth Name: apache-mod_%{mod_name} -Version: 0.10.22.4 -Release: 0.11 +Version: 1.5.27.2 +Release: 3 License: Apache v2.0 Group: Networking/Daemons/HTTP -Source0: modpagespeed-%{version}.tar.bz2 -# Source0-md5: 447f11184ab8b82f59b07a3e3b99425a +Source0: modpagespeed-%{version}.tar.xz +# Source0-md5: fa8d6a80fc4ca7f929910fa4eeb4a941 Source1: get-source.sh +Source2: gclient.conf Patch0: system-libs.patch Patch1: gcc-headers.patch -URL: https://developers.google.com/speed/pagespeed/ +Patch2: bug-632.patch +Patch3: opencv.patch +Patch4: no-dev-stdout.patch +URL: https://developers.google.com/speed/pagespeed/module BuildRequires: %{apxs} BuildRequires: apache-devel >= 2.2 BuildRequires: glib2-devel BuildRequires: gperf -BuildRequires: libjpeg-devel BuildRequires: libselinux-devel BuildRequires: libstdc++-devel >= 5:4.1 -BuildRequires: opencv-devel +BuildRequires: opencv-devel >= 2.3.1 BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: python-devel >= 1:2.6 -BuildRequires: python-gyp +# This version of gyp is new enough that it knows to use make for Linux 3.x +# and FreeBSD, but old enough that 'type': 'settings' works and +# LINKER_SUPPORTS_ICF hasn't been removed yet. +BuildRequires: python-gyp >= 0.1-0.svn1602.1 BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: tar >= 1:1.22 BuildRequires: util-linux +BuildRequires: xz BuildRequires: zlib-devel -# gcc4 might be installed, but not current __cc -%if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0" -BuildRequires: __cc >= 4.0 -%endif Requires: apache(modules-api) = %apache_modules_api Requires: apache-mod_authz_host Requires: apache-mod_headers @@ -74,31 +71,33 @@ by Page Speed can be used without having to change the way the web site is maintained. %prep -%setup -q -n modpagespeed -%patch0 -p1 -%patch1 -p1 +%setup -q -n modpagespeed-%{version} +%patch0 -p2 +%patch1 -p2 +%patch2 -p1 +%patch3 -p3 +%patch4 -p1 %build # re-gen makefiles -cd src CC="%{__cc}" \ CXX="%{__cxx}" \ -%{__python} build/gyp_chromium --format=make build/all.gyp \ +%{__python} build/gyp_chromium \ + --format=make \ + --depth=. \ + build/all.gyp \ -Duse_openssl=1 \ -Duse_system_apache_dev=1 \ -Duse_system_libjpeg=1 \ -Duse_system_libpng=1 \ -Duse_system_opencv=1 \ -Duse_system_zlib=1 \ + -Dsystem_include_path_apr=%{_includedir}/apr \ + -Dsystem_include_path_aprutil=%{_includedir}/apr-util \ + -Dsystem_include_path_httpd=%{_includedir}/apache \ %{nil} -cd .. - -# makefile wrapper so we could just invoke "make" from shell -cat > Makefile <<'EOF' -# target names from build/all.gyp -default: - $(MAKE) -C src mod_pagespeed \ +%{__make} mod_pagespeed js_minify css_minify_main \ BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \ %{?with_verbose:V=1} \ CC="%{__cc}" \ @@ -108,29 +107,34 @@ default: LINK.host="%{__cxx}" \ CFLAGS="%{rpmcflags} %{rpmcppflags}" \ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ - $(MAKEFLAGS) \ -EOF -%{__make} + %{nil} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{cachedir}/{cache,files}} -%{__make} -j1 -C src/install staging_except_module \ - HOSTNAME=localhost \ +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{_bindir},%{cachedir}} + +%{__make} -j1 -C install staging_except_module \ APACHE_ROOT=%{_pkgrootdir} \ APACHE_MODULES=modules \ APACHE_DOC_ROOT=%{htdocsdir} \ - MOD_PAGESPEED_FILE_ROOT=%{cachedir} \ + MOD_PAGESPEED_CACHE=%{cachedir} \ + MOD_PAGESPEED_STATS_LOG=/var/log/httpd/mod_pagespeed_stats.log \ STAGING_DIR=staging -install -p src/out/Release/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so -cd src/install/staging +out=out/%{!?debug:Release}%{?debug:Debug} +install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so +install -p $out/js_minify $RPM_BUILD_ROOT%{_bindir}/pagespeed_js_minify +install -p $out/css_minify_main $RPM_BUILD_ROOT%{_bindir}/pagespeed_css_minify + +cd install/staging cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <