]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blob - get-source.sh
- up to 0.10.22.4, builds on ti
[packages/apache-mod_pagespeed.git] / get-source.sh
1 #!/bin/sh
2 # Usage:
3 # ./get-source.sh
4 # Author: Elan Ruusamäe <glen@pld-linux.org>
5
6 pkg=modpagespeed
7 baseurl=http://modpagespeed.googlecode.com/svn
8 # leave empty to use latest tag, or "trunk" for trunk
9 version=
10 spec=apache-mod_pagespeed.spec
11
12 # abort on errors
13 set -e
14 # work in package dir
15 dir=$(dirname "$0")
16 cd "$dir"
17
18 if [ "$1" ]; then
19         version=$1
20 fi
21
22 if [ -z "$version" ]; then
23         echo "Looking for latest version..."
24         version=$(svn ls $baseurl/tags/ | sort -V | tail -n1)
25         version=${version%/}
26 fi
27
28 if [ "$version" = "trunk" ]; then
29         echo "Using trunk"
30         svnurl=$baseurl/trunk/src
31         tarball=$pkg-$(date +%Y%m%d).tar.bz2
32 else
33         echo "Version: $version"
34         svnurl=$baseurl/tags/$version/src
35         tarball=$pkg-$version.tar.bz2
36 fi
37
38 # gclient needs python 2.6
39 if python -c "import sys; sys.exit(sys.version[:3] > '2.6')"; then
40         echo >&2 "Need python >= 2.6 for gclient"
41         exit 1
42 fi
43
44 #wget -c https://chrome-browser.googlecode.com/svn-history/r37527/trunk/tools/depot_tools.tar.gz
45 wget -c http://distfiles.pld-linux.org/by-md5/5/6/56a3c406fcb645eaaa608a257f06a90d/depot_tools.tar.gz
46 test -d depot_tools || {
47         tar xzf depot_tools.tar.gz
48         cd depot_tools
49         svn upgrade
50         cd ..
51 }
52
53 install -d $pkg
54 cd $pkg
55 # force update
56 rm -f .gclient
57
58 ../depot_tools/gclient config $svnurl
59 ../depot_tools/gclient sync
60
61 # Populate the LASTCHANGE file template as we will not include VCS info in tarball
62 (cd src/build && svnversion > LASTCHANGE.in)
63 cd ..
64
65 tar -cjf $tarball --exclude-vcs $pkg
66 ../md5 $spec
67 ../dropin $tarball &
This page took 0.056288 seconds and 4 git commands to generate.