public
Created

PKGBUILD for spdy

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
pkgname=mod_spdy
pkgver=trunk
pkgrel=4
pkgdesc="SPDY module for Apache 2.2 that allows your web server to take advantage of SPDY features like stream multiplexing and header compression."
arch=('i686' 'x86_64')
url="http://code.google.com/p/mod-spdy/"
license=('APACHE')
makedepends=('svn' 'curl' 'depot_tools-svn' 'python2')
depends=('apache' 'depot_tools-svn')
 
build() {
cd "${srcdir}"
 
mkdir python_hack
ln -s /usr/bin/python2 python_hack/python
old_path=$PATH
PATH=$(pwd)/python_hack:$PATH
 
[ -d ${pkgname}-${pkgver} ] || mkdir "${pkgname}-${pkgver}"
cd "${pkgname}-${pkgver}"
gclient config "http://mod-spdy.googlecode.com/svn/trunk/src/"
gclient sync --force
cd src
 
./build_modssl_with_npn.sh
install -m 644 -D mod_ssl.so $pkgdir/usr/lib/httpd/modules/mod_ssl_npn.so
make BUILDTYPE=Release
install -m 644 -D ./out/Release/libmod_spdy.so $pkgdir/usr/lib/httpd/modules/mod_spdy.so
mkdir -p ${pkgdir}/etc/httpd/conf/extra/
touch ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "" > ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "LoadModule ssl_module modules/mod_ssl_npn.so" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "LoadModule spdy_module modules/mod_spdy.so" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "Include conf/extra/httpd-ssl.conf" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "SpdyEnabled on" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "#Use SPDY even over non-SSL connections; DO NOT USE IN PRODUCTION" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
echo "SpdyDebugUseSpdyForNonSslConnections off" >> ${pkgdir}/etc/httpd/conf/extra/spdy.conf
 
cd "${srcdir}"
rm -r python_hack
PATH=$old_path
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.