[packages/apache-mod_spdy] new, version 0.9.3.3
glen
glen at pld-linux.org
Mon Mar 4 11:00:58 CET 2013
commit 7e12550d2741df9fe6d3f157def852426466ad6c
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Mar 4 11:58:51 2013 +0200
new, version 0.9.3.3
based on hard work done in apache-mod_pagespeed.spec,
i.e it took just 45m to reach to this commit
apache-mod_spdy.spec | 91 +++++++++++++++++++++++++++++++++++++++++++++++++
gclient.conf | 10 ++++++
get-source.sh | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++
gyp.patch | 26 ++++++++++++++
log-constants.patch | 39 +++++++++++++++++++++
5 files changed, 261 insertions(+)
---
diff --git a/apache-mod_spdy.spec b/apache-mod_spdy.spec
new file mode 100644
index 0000000..91ee2d0
--- /dev/null
+++ b/apache-mod_spdy.spec
@@ -0,0 +1,91 @@
+%define mod_name spdy
+%define apxs %{_sbindir}/apxs
+Summary: Apache 2 module to enable SPDY support
+Name: apache-mod_%{mod_name}
+Version: 0.9.3.3
+Release: 0.1
+License: Apache v2.0
+Group: Daemons
+Source0: mod-spdy-%{version}.tar.xz
+# Source0-md5: 35770e4855b2953440be5a56d9da3fa4
+Source1: get-source.sh
+Source2: gclient.conf
+Patch0: gyp.patch
+Patch1: log-constants.patch
+URL: http://code.google.com/p/mod-spdy/
+BuildRequires: %{apxs}
+BuildRequires: apache-devel >= 2.2
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires: apache(modules-api) = %apache_modules_api
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define _pkgrootdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define _sysconfdir %{_pkgrootdir}/conf.d
+
+%description
+mod_spdy is an Apache module that allows an Apache server to support
+the SPDY protocol for serving HTTP resources.
+
+%prep
+%setup -q -n mod-spdy-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+CC="%{__cc}" \
+CXX="%{__cxx}" \
+%{__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}
+
+%{__make} mod_spdy \
+ BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
+ %{?with_verbose:V=1} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ CC.host="%{__cc}" \
+ CXX.host="%{__cxx}" \
+ LINK.host="%{__cxx}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+ %{nil}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+
+out=out/%{!?debug:Release}%{?debug:Debug}
+install -p $out/libmod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
+
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf <<EOF
+LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%service -q httpd restart
+
+%postun
+if [ "$1" = "0" ]; then
+ %service -q httpd restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
diff --git a/gclient.conf b/gclient.conf
new file mode 100644
index 0000000..985b788
--- /dev/null
+++ b/gclient.conf
@@ -0,0 +1,10 @@
+solutions = [
+ { "name" : "src",
+ "url" : "http://mod-spdy.googlecode.com/svn/trunk/src",
+ "deps_file" : "DEPS",
+ "managed" : True,
+ "custom_deps" : {
+ },
+ "safesync_url": "",
+ },
+]
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..a4ff804
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+#
+# http://code.google.com/p/mod-spdy/wiki/GettingStarted
+
+package=mod-spdy
+baseurl=http://modpagespeed.googlecode.com/svn
+baseurl=http://mod-spdy.googlecode.com/svn
+# leave empty to use latest tag, or "trunk" for trunk
+version=
+spec=apache-mod_spdy.spec
+force=0
+
+# abort on errors
+set -e
+# work in package dir
+dir=$(dirname "$0")
+cd "$dir"
+
+if [[ "$1" = *force ]]; then
+ force=1
+ shift
+fi
+
+if [ "$1" ]; then
+ version=$1
+fi
+
+if [ -z "$version" ]; then
+ echo "Looking for latest version..."
+ version=$(svn ls $baseurl/tags/ | grep '^[0-9]' | sort -V | tail -n1)
+ version=${version%/}
+fi
+
+if [ "$version" = "trunk" ]; then
+ echo "Using trunk"
+ svnurl=$baseurl/trunk/src
+ version=$(date +%Y%m%d)
+else
+ echo "Version: $version"
+ svnurl=$baseurl/tags/$version/src
+fi
+
+release_dir=$package-$version
+tarball=$release_dir.tar.xz
+
+if [ -f $tarball -a $force != 1 ]; then
+ echo "Tarball $tarball already exists"
+ exit 0
+fi
+
+# gclient needs python 2.6
+if python -c "import sys; sys.exit(sys.version[:3] > '2.6')"; then
+ echo >&2 "Need python >= 2.6 for gclient"
+ exit 1
+fi
+
+# http://www.chromium.org/developers/how-tos/install-depot-tools
+test -d depot_tools || {
+ # could also checkout:
+ # 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
+ chmod a+x depot_tools/gclient depot_tools/update_depot_tools
+}
+
+topdir=${PWD:-($pwd)}
+gclient=$topdir/gclient.conf
+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 -p $gclient .gclient
+
+# emulate gclient config, preserving our deps
+sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
+
+../depot_tools/gclient sync --nohooks -v
+
+# Populate the LASTCHANGE file template as we will not include VCS info in tarball
+(cd src && svnversion > LASTCHANGE.in)
+cd ..
+
+cp -al $package/src $release_dir
+XZ_OPT=-e9 tar -caf $tarball --exclude-vcs $release_dir
+rm -rf $release_dir
+
+../md5 $spec
+../dropin $tarball &
diff --git a/gyp.patch b/gyp.patch
new file mode 100644
index 0000000..797645c
--- /dev/null
+++ b/gyp.patch
@@ -0,0 +1,26 @@
+fix:
+
+Exception: Target third_party/apache/aprutil/aprutil.gyp:aprutil#target has an invalid target type 'settings'. Must be one of executable/loadable_module/static_library/shared_library/none.
+
+--- mod-spdy-0.9.3.3/third_party/apache/apr/apr.gyp~ 2013-03-04 11:24:34.000000000 +0200
++++ mod-spdy-0.9.3.3/third_party/apache/apr/apr.gyp 2013-03-04 11:35:09.610648619 +0200
+@@ -192,7 +192,7 @@
+ },
+ {
+ 'target_name': 'apr',
+- 'type': 'settings',
++ 'type': 'none',
+ 'dependencies': [
+ 'include',
+ ],
+--- mod-spdy-0.9.3.3/third_party/apache/aprutil/aprutil.gyp~ 2013-03-04 11:24:34.000000000 +0200
++++ mod-spdy-0.9.3.3/third_party/apache/aprutil/aprutil.gyp 2013-03-04 11:36:54.408819317 +0200
+@@ -142,7 +142,7 @@
+ },
+ {
+ 'target_name': 'aprutil',
+- 'type': 'settings',
++ 'type': 'none',
+ 'dependencies': [
+ 'include',
+ ],
diff --git a/log-constants.patch b/log-constants.patch
new file mode 100644
index 0000000..8ad129d
--- /dev/null
+++ b/log-constants.patch
@@ -0,0 +1,39 @@
+fix:
+
+third_party/chromium/src/base/logging.h:292:19: error: expected unqualified-id before numeric constant
+
+"fix":
+mod_spdy/mod_spdy.cc: In function 'void {anonymous}::ChildInit(apr_pool_t*, server_rec*)':
+mod_spdy/mod_spdy.cc:253:31: error: 'LOG_INFO' was not declared in this scope
+mod_spdy/mod_spdy.cc:253:31: note: suggested alternative:
+In file included from third_party/chromium/src/net/spdy/spdy_protocol.h:13:0,
+ from third_party/chromium/src/net/spdy/spdy_framer.h:19,
+ from ./mod_spdy/common/http_to_spdy_converter.h:24,
+ from ./mod_spdy/apache/filters/http_to_spdy_filter.h:24,
+ from mod_spdy/mod_spdy.cc:40:
+third_party/chromium/src/base/logging.h:290:19: note: 'logging::LOG_INFO'
+mod_spdy/mod_spdy.cc:253:45: error: template argument 1 is invalid
+mod_spdy/mod_spdy.cc:253:108: error: invalid type in declaration before ';' token
+--- mod-spdy-0.9.3.3/third_party/chromium/src/base/logging.h~ 2013-03-04 11:44:06.000000000 +0200
++++ mod-spdy-0.9.3.3/third_party/chromium/src/base/logging.h 2013-03-04 11:44:09.508892187 +0200
+@@ -286,7 +286,9 @@
+ const LogSeverity LOG_VERBOSE = -1; // This is level 1 verbosity
+ // Note: the log severities are used to index into the array of names,
+ // see log_severity_names.
++#undef LOG_INFO
+ const LogSeverity LOG_INFO = 0;
++#undef LOG_WARNING
+ const LogSeverity LOG_WARNING = 1;
+ const LogSeverity LOG_ERROR = 2;
+ const LogSeverity LOG_ERROR_REPORT = 3;
+--- mod-spdy-0.9.3.3/mod_spdy/mod_spdy.cc~ 2013-03-04 11:24:35.000000000 +0200
++++ mod-spdy-0.9.3.3/mod_spdy/mod_spdy.cc 2013-03-04 11:47:51.855821877 +0200
+@@ -250,7 +250,7 @@
+ // determine the most verbose log level of any server in the list.
+ bool spdy_enabled = false;
+ int max_apache_log_level = APLOG_EMERG; // the least verbose log level
+- COMPILE_ASSERT(APLOG_INFO > APLOG_ERR, bigger_number_means_more_verbose);
++ //COMPILE_ASSERT(APLOG_INFO > APLOG_ERR, bigger_number_means_more_verbose);
+ for (server_rec* server = server_list; server != NULL;
+ server = server->next) {
+ spdy_enabled |= mod_spdy::GetServerConfig(server)->spdy_enabled();
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_spdy.git/commitdiff/7e12550d2741df9fe6d3f157def852426466ad6c
More information about the pld-cvs-commit
mailing list