]> git.pld-linux.org Git - packages/libyuv.git/commitdiff
get source from svn using gclient
authorElan Ruusamäe <glen@delfi.ee>
Wed, 9 Jan 2013 07:53:01 +0000 (09:53 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 9 Jan 2013 07:53:01 +0000 (09:53 +0200)
script based on best bits from
apache-mod_pagespeed/get-source.sh
and chromium-browser/get-source.sh

gclient.conf [new file with mode: 0644]
get-source.sh [new file with mode: 0755]

diff --git a/gclient.conf b/gclient.conf
new file mode 100644 (file)
index 0000000..d097e71
--- /dev/null
@@ -0,0 +1,10 @@
+solutions = [
+  { "name"        : "trunk",
+    "url"         : "http://libyuv.googlecode.com/svn/trunk",
+    "deps_file"   : "DEPS",
+    "managed"     : True,
+    "custom_deps" : {
+    },
+    "safesync_url": "",
+  },
+]
diff --git a/get-source.sh b/get-source.sh
new file mode 100755 (executable)
index 0000000..e4051f3
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Make snapshot of libyuv
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+set -e
+
+package=libyuv
+specfile=$package.spec
+baseurl=http://$package.googlecode.com/svn
+svnurl=$baseurl/trunk
+ext=xz
+tarball=$package-$(date +%Y%m%d).tar.$ext
+
+# get depot tools
+# 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
+
+cd ..
+
+XZ_OPT=-e9 tar -cf $tarball --$ext  --exclude-vcs $package
+../md5 $specfile
+../dropin $tarball &
This page took 0.14928 seconds and 4 git commands to generate.