]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blobdiff - apache-mod_pagespeed.spec
up to 1.8.31.5
[packages/apache-mod_pagespeed.git] / apache-mod_pagespeed.spec
index 50c90a8d72994a915b527926841ce3a32b9d68a6..e087ebd9ddd76986c42570241ce7f19a38c6715e 100644 (file)
@@ -1,55 +1,60 @@
 #
 # Conditional build:
-%bcond_with    verbose         # verbose build (V=1)
+%bcond_without verbose         # verbose build (V=1)
 
 # 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
+# - 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
-# - 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
-#   http://pastebin.com/Eu88BPSQ
-# - 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",
-# - use only source for modpagespeed if system headers are used (remove copies from tarball)
+#  protobuf_lite
+
 %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.9.17.7
-Release:       0.4
+# beta: 1.9.32.2-beta
+# stable: 1.8.31.5
+Version:       1.8.31.5
+Release:       0.6
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
-Source0:       modpagespeed-%{version}.tar.bz2
-# Source0-md5: d4a49e422da63d6487afbec731432e21
-URL:           http://code.google.com/p/modpagespeed/
+Source0:       modpagespeed-%{version}.tar.xz
+# Source0-md5: ce0f27b177fba51f6b9f08fed8134709
+Source1:       get-source.sh
+Source2:       gclient.conf
+Patch0:                system-libs.patch
+Patch2:                bug-632.patch
+Patch4:                no-dev-stdout.patch
+URL:           https://developers.google.com/speed/pagespeed/module
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.2
-BuildRequires: libstdc++-devel >= 6:4.2
+BuildRequires: bash
+BuildRequires: glib2-devel
+BuildRequires: gperf
+BuildRequires: libselinux-devel
+BuildRequires: libstdc++-devel >= 5:4.1
+BuildRequires: opencv-devel >= 2.3.1
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
 BuildRequires: python-devel >= 1:2.6
+# 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
 Requires:      apache(modules-api) = %apache_modules_api
 Requires:      apache-mod_authz_host
+Requires:      apache-mod_headers
 Suggests:      apache-mod_deflate
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -67,20 +72,31 @@ by Page Speed can be used without having to change the way the web
 site is maintained.
 
 %prep
-%setup -q -n modpagespeed
+%setup -q -n modpagespeed-%{version}
+%patch0 -p2
+%patch2 -p1
+%patch4 -p1
 
 %build
 # re-gen makefiles
-cd src
 CC="%{__cc}" \
 CXX="%{__cxx}" \
-%{__python} build/gyp_chromium --format=make build/all.gyp
-cd ..
+%{__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}
 
-# makefile wrapper so we could just invoke "make" from shell
-cat > Makefile <<'EOF'
-default:
-       $(MAKE) -C src \
+%{__make} mod_pagespeed js_minify css_minify_main \
        BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
        %{?with_verbose:V=1} \
        CC="%{__cc}" \
@@ -90,29 +106,37 @@ default:
        LINK.host="%{__cxx}" \
        CFLAGS="%{rpmcflags} %{rpmcppflags}" \
        CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
-EOF
-%{__make}
+       %{nil}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} -j1 -C src/install staging \
-       HOSTNAME=localhost \
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{_bindir},%{cachedir}}
+
+%{__make} -j1 -C install staging_except_module \
        APACHE_ROOT=%{_pkgrootdir} \
-       APACHE_MODULES=%{_pkglibdir} \
+       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
 
-cd staging
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install -d $RPM_BUILD_ROOT%{cachedir}/{cache,files}
+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 <<EOF
 LoadModule %{mod_name}_module  modules/mod_%{mod_name}.so
 
 $(cat pagespeed.conf)
 EOF
 
+cp -p pagespeed_libraries.conf $RPM_BUILD_ROOT%{_sysconfdir}/91_mod_%{mod_name}_libraries.conf
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a mod_pagespeed_example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -127,8 +151,9 @@ fi
 %files
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}_libraries.conf
+%attr(755,root,root) %{_bindir}/pagespeed_css_minify
+%attr(755,root,root) %{_bindir}/pagespeed_js_minify
 %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
-
-%dir %attr(710,root,http) %{cachedir}
-%dir %attr(770,root,http) %{cachedir}/cache
-%dir %attr(770,root,http) %{cachedir}/files
+%{_examplesdir}/%{name}-%{version}
+%dir %attr(770,root,http) %{cachedir}
This page took 0.031127 seconds and 4 git commands to generate.