summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD87
3 files changed, 37 insertions, 88 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f8a4952eab0..9b984ddf733 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,39 +1,20 @@
pkgbase = gn-git
pkgdesc = Meta-build system which generates Ninja build files
- pkgver = r1314.3200906
- pkgrel = 2
+ pkgver = r1438.8ce4e49a
+ pkgrel = 1
+ url = https://gn.googlesource.com/gn
arch = x86_64
arch = i686
license = BSD
makedepends = python2
+ makedepends = ninja
+ makedepends = clang
depends = glibc
depends = gcc-libs
provides = gn
conflicts = gn-bin
- 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 = git+https://chromium.googlesource.com/chromium/llvm-project/libcxx
- source = git+https://chromium.googlesource.com/chromium/llvm-project/libcxxabi
- source = LICENSE
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = SKIP
- sha1sums = 5548778e53b16da694f02b4716c9b3678e63305a
+ source = gn::git+https://gn.googlesource.com/gn
+ sha512sums = SKIP
pkgname = gn-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..d01d40e6f62
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/gn/
+/pkg/
+/src/
+/*.tar
+/*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index d99e5fe629f..dfa301c684e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,88 +1,51 @@
# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
# Maintainer: Alexandre Macabies <web+oss@zopieux.com>
#
-# Inspiration for this PKGBUILD:
-# https://gist.github.com/mohamed/4fa7eb75807463d4dfa3
-#
pkgname='gn-git'
pkgdesc='Meta-build system which generates Ninja build files'
-pkgver=r1314.3200906
-pkgrel=2
+pkgver=r1438.8ce4e49a
+pkgrel=1
license=('BSD')
arch=('x86_64' 'i686')
conflicts=('gn-bin')
provides=('gn')
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'
- 'git+https://chromium.googlesource.com/chromium/llvm-project/libcxx'
- 'git+https://chromium.googlesource.com/chromium/llvm-project/libcxxabi'
- LICENSE
-)
-noextract=('libevent.tar.gz' 'gn' 'base' 'build' 'config' 'gtest')
-sha1sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- '5548778e53b16da694f02b4716c9b3678e63305a')
-
-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,buildtools/third_party/libc++{,abi}}
- mv "${srcdir}/base" "${srcdir}/work"
- mv "${srcdir}/build" "${srcdir}/work"
- mv "${srcdir}/config" "${srcdir}/work"
- mv "${srcdir}/gn" "${srcdir}/work/tools"
- mv "${srcdir}/gtest" "${srcdir}/work/testing"
- mv "${srcdir}/libcxx" "${srcdir}/work/buildtools/third_party/libc++/trunk"
- mv "${srcdir}/libcxxabi" "${srcdir}/work/buildtools/third_party/libc++abi/trunk"
-}
+makedepends=('python2' 'ninja' 'clang')
+url='https://gn.googlesource.com/gn'
+source=("gn::git+${url}")
+sha512sums=(SKIP)
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)"
- )
+ 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
+ cd gn
+ python2 build/gen.py
+ ninja -C out
}
package () {
- cd "${srcdir}/work"
- install -Dm755 out/Release/gn "${pkgdir}/usr/bin/gn"
+ install -Dm755 gn/out/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}/"
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
+ gn/tools/gn/docs/*.md
- # Vim support
- mkdir -p "${pkgdir}/usr/share/vim/vimfiles"
- cp -r tools/gn/misc/vim/{ftdetect,syntax} \
- "${pkgdir}/usr/share/vim/vimfiles/"
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}/example" \
+ gn/tools/gn/example/*.*
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}/example/build" \
+ gn/tools/gn/example/build/*.*
+ # Vim support
+ local item
+ for item in autoload ftplugin ftdetect syntax ; do
+ install -Dm 644 -t "${pkgdir}/usr/share/vim/vimfiles/${item}" \
+ "gn/tools/gn/misc/vim/${item}"/*.vim
+ done
+
# License
- install -Dm644 "${startdir}/LICENSE" \
+ install -m 644 -D gn/LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
-