]> git.pld-linux.org Git - packages/crossnacl-gcc.git/commitdiff
- add script to fetch source tarball
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 6 Jul 2012 22:40:40 +0000 (22:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossnacl-gcc.spec -> 1.11
    get-source.sh -> 1.1

crossnacl-gcc.spec
get-source.sh [new file with mode: 0644]

index 40d4f72930bf26a5e5c933774b0bf2a0d8f0c1c3..ee2acc278179a3cc7fca86adb8302fd97caf7c52 100644 (file)
@@ -20,6 +20,7 @@ License:      GPL v3+ and GPL v3+ with exceptions and GPL v2+ with exceptions
 Group:         Development/Languages
 Source0:       nacl-gcc-%{version}-git%{gitver}.tar.bz2
 # Source0-md5: 50e316936d59c7951b91cff8124c0b30
+Source1:       get-source.sh
 URL:           http://sourceware.org/gcc/
 BuildRequires: cloog-ppl-devel
 BuildRequires: crossnacl-binutils
diff --git a/get-source.sh b/get-source.sh
new file mode 100644 (file)
index 0000000..8519b09
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Make snapshot of nacl-binutils
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+# $Id$
+set -e
+
+# Generated from git
+# git clone http://git.chromium.org/native_client/nacl-gcc.git
+# (Checkout ID taken from chromium-15.0.874.106/native_client/tools/REVISIONS)
+# cd nacl-gcc
+# git checkout cff9ac884908ba53ae16149e7c7d19c336aa4895
+# cd ..
+# For gcc version, echo gcc/BASE-VER
+# mv nacl-gcc nacl-gcc-4.4.3-gitcff9ac88
+# tar cfj nacl-gcc-4.4.3-gitcff9ac88.tar.bz2 nacl-gcc-4.4.3-gitcff9ac88
+
+package=nacl-gcc
+repo_url=http://git.chromium.org/native_client/$package.git
+specfile=crossnacl-gcc.spec
+
+chrome_version=20.0.1132.47
+
+chrome_revision=$(curl -s https://omahaproxy.appspot.com/revision?version=$chrome_version)
+chrome_branch=$(IFS=.; set -- $chrome_version; echo $3)
+test -e DEPS.py || svn cat http://src.chromium.org/chrome/branches/$chrome_branch/src/DEPS@$chrome_revision > DEPS.py
+nacl_revision=$(awk -F'"' '/nacl_revision.:/{print $4}' DEPS.py)
+
+# nacl_revision taken from src/DEPS of chrome 20.0.1132.47
+nacl_revision=8118
+
+export GIT_DIR=$package/.git
+
+if [ ! -d $package ]; then
+       install -d $package
+       git init
+       git remote add origin $repo_url
+       git fetch --depth 1 origin refs/heads/master:refs/remotes/origin/master
+else
+       git fetch origin refs/heads/master:refs/remotes/origin/master
+fi
+
+# get src/native_client/tools/REVISIONS directly from svn
+test -e NACL_REVISIONS.sh || svn cat https://src.chromium.org/native_client/trunk/src/native_client/tools/REVISIONS@$nacl_revision > NACL_REVISIONS.sh
+
+if grep -Ev '^(#|(LINUX_HEADERS_FOR_NACL|NACL_(BINUTILS|GCC|GDB|GLIBC|NEWLIB))_COMMIT=[0-9a-f]+$|)' NACL_REVISIONS.sh >&2; then
+       echo >&2 "I refuse to execute grabbed file for security concerns"
+       exit 1
+fi
+. ./NACL_REVISIONS.sh
+
+githash=$NACL_GCC_COMMIT
+version=$(git show $githash:gcc/BASE-VER)
+shorthash=$(git rev-parse --short $githash)
+prefix=$package-$version-git$shorthash
+
+if [ -f $prefix.tar.bz2 ]; then
+       echo "Tarball $prefix.tar.bz2 already exists at $shorthash"
+       exit 0
+fi
+
+git archive $githash --prefix $prefix/ > $prefix.tar
+bzip2 -9 $prefix.tar
+
+../dropin $prefix.tar.bz2
+
+rm -f NACL_REVISIONS.sh DEPS.py
This page took 0.202419 seconds and 4 git commands to generate.