summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrián Pérez de Castro2015-09-14 22:15:27 +0300
committerAdrián Pérez de Castro2015-09-14 22:15:52 +0300
commit4b622a62041c265706bdd19f334da5f75b3db21c (patch)
tree674c71752541ca4ef9bed728d659fa79fcb51b2d
downloadaur-4b622a62041c265706bdd19f334da5f75b3db21c.tar.gz
Initial import
-rw-r--r--.SRCINFO35
-rw-r--r--LICENSE27
-rw-r--r--PKGBUILD75
3 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8000c686fe9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+# Generated by mksrcinfo v7
+# Mon Sep 14 19:15:17 UTC 2015
+pkgbase = gn-git
+ pkgdesc = Meta-build system which generates Ninja build files
+ pkgver = r694.feb0c39
+ pkgrel = 1
+ arch = x86_64
+ arch = i686
+ license = BSD
+ makedepends = python2
+ depends = glibc
+ depends = gcc-libs
+ noextract = libevent.tar.gz
+ noextract = gn
+ noextract = base
+ noextract = build
+ noextract = config
+ noextract = gtest
+ source = https://chromium.googlesource.com/chromium/chromium/+archive/master/third_party/libevent.tar.gz
+ source = git+https://chromium.googlesource.com/chromium/src/tools/gn
+ source = git+https://chromium.googlesource.com/chromium/src/base
+ source = git+https://chromium.googlesource.com/chromium/src/build
+ source = git+https://chromium.googlesource.com/chromium/src/build/config
+ source = git+https://chromium.googlesource.com/chromium/testing/gtest
+ source = LICENSE
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+
+pkgname = gn-git
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000000..a32e00ce6be
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e1f7cc39110
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
+pkgname='gn-git'
+pkgdesc='Meta-build system which generates Ninja build files'
+pkgver=r694.feb0c39
+pkgrel=1
+license='BSD'
+arch=('x86_64' 'i686')
+depends=('glibc' 'gcc-libs')
+makedepends=('python2')
+source=(
+ 'https://chromium.googlesource.com/chromium/chromium/+archive/master/third_party/libevent.tar.gz'
+ "git+https://chromium.googlesource.com/chromium/src/tools/gn"
+ "git+https://chromium.googlesource.com/chromium/src/base"
+ "git+https://chromium.googlesource.com/chromium/src/build"
+ "git+https://chromium.googlesource.com/chromium/src/build/config"
+ "git+https://chromium.googlesource.com/chromium/testing/gtest"
+ LICENSE
+)
+noextract=('libevent.tar.gz' 'gn' 'base' 'build' 'config' 'gtest')
+sha512sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
+
+prepare () {
+ rm -rf "${srcdir}/work"
+
+ mkdir -p "${srcdir}/work/third_party/libevent"
+ tar -xzf "${srcdir}/libevent.tar.gz" -C "${srcdir}/work/third_party/libevent"
+
+ # Shuffle things around a bit to put everything where it is suppossed to be
+ mkdir -p "${srcdir}/work"/{tools,testing}
+ mv "${srcdir}/gn" "${srcdir}/work/tools"
+ mv "${srcdir}/base" "${srcdir}/work"
+ mv "${srcdir}/build" "${srcdir}/work"
+ mv "${srcdir}/config" "${srcdir}/work"
+ mv "${srcdir}/gtest" "${srcdir}/work/testing"
+}
+
+pkgver () {
+ export GIT_DIR="${startdir}/gn"
+ (
+ set -o pipefail
+ git --bare describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git --bare rev-list --count HEAD)" "$(git --bare rev-parse --short HEAD)"
+ )
+}
+
+build () {
+ cd "${srcdir}/work/tools/gn"
+ python2 bootstrap/bootstrap.py -s
+}
+
+package () {
+ cd "${srcdir}/work"
+ install -Dm755 out/Release/gn "${pkgdir}/usr/bin/gn"
+
+ # Documentation
+ mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r tools/gn/README.md tools/gn/docs/*.md tools/gn/example \
+ "${pkgdir}/usr/share/doc/${pkgname}/"
+
+ # Vim support
+ mkdir -p "${pkgdir}/usr/share/vim/vimfiles"
+ cp -r tools/gn/misc/vim/{ftdetect,syntax} \
+ "${pkgdir}/usr/share/vim/vimfiles/"
+
+ # License
+ install -Dm644 "${startdir}/LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+