updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mod_pagespeed / PKGBUILD
blob8264d3c9e8067b71d199c03e679882ef3dfee915
1 # Contributor: Andreas Schrafl <aschrafl@gmail.com>
2 pkgname=mod_pagespeed
3 pkgver=0.9.18.9
4 pkgrel=0
5 pkgdesc="mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server."
6 arch=(i686 x86_64)
7 url="http://code.google.com/speed/page-speed/docs/module.html"
8 license=('Apache 2.0 Open Source License')
9 depends=('apache')
10 makedepends=('depot_tools-svn' 'subversion' 'gcc' 'python2')
11 source=('pagespeed.conf.patch' 'cxcore.hpp.patch')
12 _srcpath="http://modpagespeed.googlecode.com/svn/tags/$pkgver/src"
13 backup=('etc/httpd/conf/extra/pagespeed.conf')
15 md5sums=('4b2081318636e228ceea09bac9cda7d4'
16          '511ccfbe950f2a9e88a9655139f152ca')
18 build() {
19   #cleanup the src directory
20   if [ -d "$srcdir/src" ]; then
21     rm -r $srcdir/src
22   fi
24   if [ -f $srcdir/.gclient ]; then
25     rm $srcdir/.gclient
26   fi
28   cd "$srcdir"
30 #  CFLAGS="\$CFLAGS -Wno-error=unused-but-set-variable"
32   gclient config $_srcpath
33   gclient sync --force
35   cd $srcdir
36   patch -p0 < cxcore.hpp.patch
38   cd $srcdir/src
39   make BUILDTYPE=Release
41   mkdir -p $pkgdir/var/www/wwwtmp/cache
42   mkdir -p $pkgdir/var/www/wwwtmp/files
43   chown -R http:http $pkgdir/var/www/wwwtmp
45   mkdir -p $pkgdir/etc/httpd/conf/extra
46   cat $srcdir/src/out/Release/install/common/pagespeed.load.template $srcdir/src/out/Release/install/common/pagespeed.conf.template > $pkgdir/etc/httpd/conf/extra/pagespeed.conf
47   cd $pkgdir/etc/httpd/conf/extra
48   patch -p0 < $srcdir/pagespeed.conf.patch
49   chown root:root $pkgdir/etc/httpd/conf/extra/pagespeed.conf
51   mkdir -p $pkgdir/etc/httpd/modules
52   cp $srcdir/src/out/Release/libmod_pagespeed.so $pkgdir/etc/httpd/modules/mod_pagespeed.so
53   chown root:root $pkgdir/etc/httpd/modules/mod_pagespeed.so
56 # vim:set ts=2 sw=2 et: