[packages/apache-mod_pagespeed] up to 1.3.25.3
glen
glen at pld-linux.org
Sat Mar 2 13:20:02 CET 2013
commit 5bdfa7047ad6df7fecc07612d8d15715a9d21807
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Mar 2 12:37:28 2013 +0200
up to 1.3.25.3
apache-mod_pagespeed.spec | 44 ++++++++++++++++++--------------------------
gcc-headers.patch | 22 ++++++----------------
get-source.sh | 22 ++++++++++++----------
3 files changed, 36 insertions(+), 52 deletions(-)
---
diff --git a/apache-mod_pagespeed.spec b/apache-mod_pagespeed.spec
index d5fb25b..2fa2d32 100644
--- a/apache-mod_pagespeed.spec
+++ b/apache-mod_pagespeed.spec
@@ -24,12 +24,12 @@
%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.7
-Release: 2
+Version: 1.3.25.3
+Release: 0.3
License: Apache v2.0
Group: Networking/Daemons/HTTP
Source0: modpagespeed-%{version}.tar.xz
-# Source0-md5: 1c67625812d18899ce6a47da069c6043
+# Source0-md5: 7df9bf6b1aacec28d81b1678192652ca
Source1: get-source.sh
Patch0: system-libs.patch
Patch1: gcc-headers.patch
@@ -78,16 +78,18 @@ 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
%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 \
@@ -99,13 +101,7 @@ CXX="%{__cxx}" \
-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 \
BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
%{?with_verbose:V=1} \
CC="%{__cc}" \
@@ -115,23 +111,21 @@ 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 \
+%{__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
+install -p out/Release/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
+cd install/staging
cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
@@ -158,6 +152,4 @@ fi
%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
%{_examplesdir}/%{name}-%{version}
-%dir %attr(710,root,http) %{cachedir}
-%dir %attr(770,root,http) %{cachedir}/cache
-%dir %attr(770,root,http) %{cachedir}/files
+%dir %attr(770,root,http) %{cachedir}
diff --git a/gcc-headers.patch b/gcc-headers.patch
index 22a3558..7404ab8 100644
--- a/gcc-headers.patch
+++ b/gcc-headers.patch
@@ -1,20 +1,10 @@
---- modpagespeed/src/net/instaweb/apache/apache_message_handler.h~ 2012-06-24 15:31:47.000000000 +0300
-+++ modpagespeed/src/net/instaweb/apache/apache_message_handler.h 2012-07-07 15:16:57.930461612 +0300
-@@ -18,6 +18,7 @@
- #define NET_INSTAWEB_APACHE_APACHE_MESSAGE_HANDLER_H_
-
- #include <string>
-+#include <unistd.h>
- #include "net/instaweb/apache/apr_timer.h"
- #include "net/instaweb/util/public/basictypes.h"
- #include "net/instaweb/util/public/google_message_handler.h"
---- modpagespeed/src/net/instaweb/apache/log_message_handler.h~ 2012-06-24 15:31:47.000000000 +0300
-+++ modpagespeed/src/net/instaweb/apache/log_message_handler.h 2012-07-07 15:18:47.358883477 +0300
+--- modpagespeed/src/net/instaweb/util/hostname_util.cc~ 2013-03-02 01:53:18.000000000 +0200
++++ modpagespeed/src/net/instaweb/util/hostname_util.cc 2013-03-02 11:28:01.761343397 +0200
@@ -19,6 +19,7 @@
- #define NET_INSTAWEB_APACHE_LOG_MESSAGE_HANDLER_H_
+ #include "net/instaweb/util/public/hostname_util.h"
- #include <algorithm> // for std::min
+ #include <limits.h>
+#include <unistd.h>
- #include "apr_pools.h"
+ // The following break portability.
- #include "net/instaweb/util/public/string_util.h"
+ // Windows doesn't use <unistd.h> nor does it define HOST_NAME_MAX.
diff --git a/get-source.sh b/get-source.sh
index b39e0aa..a1a39c0 100755
--- a/get-source.sh
+++ b/get-source.sh
@@ -6,7 +6,7 @@
# To see release notes, see this page:
# https://developers.google.com/speed/docs/mod_pagespeed/release_notes
-pkg=modpagespeed
+package=modpagespeed
baseurl=http://modpagespeed.googlecode.com/svn
# leave empty to use latest tag, or "trunk" for trunk
version=
@@ -37,13 +37,15 @@ fi
if [ "$version" = "trunk" ]; then
echo "Using trunk"
svnurl=$baseurl/trunk/src
- tarball=$pkg-$(date +%Y%m%d).tar.xz
+ version=$(date +%Y%m%d)
else
echo "Version: $version"
svnurl=$baseurl/tags/$version/src
- tarball=$pkg-$version.tar.xz
fi
+release_dir=$package-$version
+tarball=$release_dir.tar.xz
+
if [ -f $tarball -a $force != 1 ]; then
echo "Tarball $tarball already exists"
exit 0
@@ -61,23 +63,20 @@ test -d depot_tools || {
# svn co http://src.chromium.org/svn/trunk/tools/depot_tools
wget -c https://src.chromium.org/svn/trunk/tools/depot_tools.zip
unzip -qq depot_tools.zip
-# cd depot_tools
-# svn upgrade
-# cd ..
chmod a+x depot_tools/gclient depot_tools/update_depot_tools
}
topdir=${PWD:-($pwd)}
gclient=$topdir/gclient.conf
-install -d $pkg
-cd $pkg
+install -d $package
+cd $package
if [ ! -f $gclient ]; then
# create initial config that can be later modified
../depot_tools/gclient config $svnurl --gclientfile=$gclient
fi
-cp $gclient .gclient
+cp -p $gclient .gclient
# emulate gclient config, preserving our deps
sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
@@ -88,6 +87,9 @@ sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
(cd src && svnversion > LASTCHANGE.in)
cd ..
-tar -cJf $tarball --exclude-vcs $pkg
+cp -al $package/src $release_dir
+XZ_OPT=-e9 tar -caf $tarball --exclude-vcs $release_dir
+rm -rf $release_dir
+
../md5 $spec
../dropin $tarball &
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_pagespeed.git/commitdiff/1a9213c5c5e34d9ea7d9bc1f7662bfacf3a22e20
More information about the pld-cvs-commit
mailing list