diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-02-26 01:11:39 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-03-20 17:19:03 +0100 |
commit | 0a57831352d4aeae8a197ac6907059bfbbd8787c (patch) | |
tree | a5fbf82bfa8910f12b3f61ee224a5bc1c5fb4b1b /tools | |
parent | 0285b8993f0c1dad827ac9a8ceb3fd9a6769b4a8 (diff) |
Add tool to add new deps to build system
Diffstat (limited to 'tools')
-rw-r--r-- | tools/add-dependency.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/add-dependency.sh b/tools/add-dependency.sh new file mode 100644 index 00000000..5286dd44 --- /dev/null +++ b/tools/add-dependency.sh @@ -0,0 +1,46 @@ +# Adds a new dependency to the build system +# usage: +# sh tools/add-dependency.sh /home/andoni/cerbero/sources/local libtasn1 2.11 http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.11.tar.gz "tar -xvzf" + +PREFIX=$1 +DEPENDENCY=$2 +VERSION=$3 +LOCATION=$4 +EXTRACT=$5 + +SSH_LOGIN="amorales@git.keema.collabora.co.uk" +GIT_ROOT="/srv/git.keema.collabora.co.uk/git/gst-sdk" +REMOTE_GIT_ROOT="ssh+git://amorales@git.keema.collabora.co.uk/git/gst-sdk" + +curdir=`pwd` + +ssh $SSH_LOGIN "git init --bare $GIT_ROOT/$DEPENDENCY.git" +git init $PREFIX/$DEPENDENCY +chdir $PREFIX/$DEPENDENCY +wget $LOCATION + +$EXTRACT $DEPENDENCY* + +mv $DEPENDENCY-$VERSION/* . +rm *.tar.xz +rm *.tar.gz +rm *.tar.bz +rm *.zip +git add * +git commit -m "Import upstream release $DEPENDENCY-$VERSION" +git remote add origin $REMOTE_GIT_ROOT/$DEPENDENCY.git +git branch upstream +git tag upstream/$VERSION -a -m "Tag upstream release $VERSION" +git branch sdk-$VERSION +git push origin sdk-$VERSION +git push origin upstream +git push --tags + +chdir $curdir +echo "from cerbero import recipe\n\ +\n\ +class Recipe(recipe.Recipe):\n\ + name = '$DEPENDENCY'\n\ + version = '$VERSION'\ +" > cerbero/recipes/$DEPENDENCY.recipe + |