[packages/libyuv] get source from svn using gclient
glen
glen at pld-linux.org
Wed Jan 9 08:55:24 CET 2013
commit 5d9f4dacd85b51c76eee2baa34fe72dd8722c82b
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Jan 9 09:53:01 2013 +0200
get source from svn using gclient
script based on best bits from
apache-mod_pagespeed/get-source.sh
and chromium-browser/get-source.sh
gclient.conf | 10 ++++++++++
get-source.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+)
---
diff --git a/gclient.conf b/gclient.conf
new file mode 100644
index 0000000..d097e71
--- /dev/null
+++ b/gclient.conf
@@ -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
index 0000000..e4051f3
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Make snapshot of libyuv
+# Author: Elan Ruusamäe <glen at 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 &
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libyuv.git/commitdiff/5d9f4dacd85b51c76eee2baa34fe72dd8722c82b
More information about the pld-cvs-commit
mailing list