summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Legner2015-06-12 11:11:00 +0200
committerSimon Legner2015-06-12 11:11:00 +0200
commitb3804eae37db0f6e0c6301e6cf47b13a60828f71 (patch)
tree58fecfecddace74e6111e61b5bf9759c8f59c507
downloadaur-b3804eae37db0f6e0c6301e6cf47b13a60828f71.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD58
-rw-r--r--bazel.install4
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bf9942f79e3c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = bazel-git
+ pkgdesc = Correct, reproducible, and fast builds for everyone
+ pkgver = r858.18629fb
+ pkgrel = 1
+ url = http://bazel.io/
+ install = bazel.install
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = protobuf
+ depends = java-environment=8
+ depends = libarchive
+ depends = gcc-libs-multilib
+ depends = zip
+ depends = unzip
+ options = !strip
+
+pkgname = bazel-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1fb0f8c23c54
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Simon Legner <Simon.Legner@gmail.com>
+pkgname=bazel-git
+pkgver=r858.18629fb
+pkgrel=1
+pkgdesc="Correct, reproducible, and fast builds for everyone"
+arch=('i686' 'x86_64')
+url="http://bazel.io/"
+license=('Apache')
+depends=('java-environment=8' 'libarchive' 'gcc-libs-multilib' 'zip' 'unzip')
+makedepends=('git' 'protobuf')
+install=bazel.install
+options=('!strip')
+
+_gitroot=https://github.com/google/bazel.git
+_gitname=bazel
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ #
+ # BUILD HERE
+ #
+ ./compile.sh
+ ./output/bazel build scripts:bazel-complete.bash
+}
+
+package() {
+ install -Dm755 "$srcdir/$_gitname-build/output/bazel" "$pkgdir/usr/bin/bazel"
+ install -Dm755 "$srcdir/$_gitname-build/bazel-bin/scripts/bazel-complete.bash" "$pkgdir/etc/bash_completion.d/bazel-complete.bash"
+ mkdir -p "$pkgdir/opt/bazel/base_workspace"
+ for d in examples third_party tools; do
+ cp -r "$srcdir/$_gitname-build/$d" "$pkgdir/opt/bazel/"
+ cd "$pkgdir/opt/bazel/base_workspace"
+ ln -s "/opt/bazel/$d" ./
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/bazel.install b/bazel.install
new file mode 100644
index 000000000000..ad0bc7367d6b
--- /dev/null
+++ b/bazel.install
@@ -0,0 +1,4 @@
+post_install() {
+ echo '>>> To start a new project, type:'
+ echo '>>> $ cp -R /opt/bazel/base_workspace my_new_workspace'
+}