diff options
author | Alexander F Rødseth | 2017-01-18 16:01:36 +0100 |
---|---|---|
committer | Alexander F Rødseth | 2017-01-18 16:01:36 +0100 |
commit | 74584f2bc63a229102c0af6b5f7717dd4fd4d3af (patch) | |
tree | 86660c4e626ed65294a11c86b0e261d32b621683 | |
download | aur-74584f2bc63a229102c0af6b5f7717dd4fd4d3af.tar.gz |
Add grumpy
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | makefile.patch | 24 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4155c2b3162c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +# Generated by mksrcinfo v8 +# Wed Jan 18 15:01:01 UTC 2017 +pkgbase = grumpy + pkgdesc = Grumpy is a Python to Go source code transcompiler and runtime + pkgver = r149.35d1202 + pkgrel = 1 + url = https://github.com/google/grumpy + arch = x86_64 + arch = i686 + license = Apache + makedepends = git + makedepends = go + makedepends = python2 + depends = go + depends = python2 + options = !strip + source = git+https://github.com/google/grumpy.git + source = makefile.patch + md5sums = SKIP + md5sums = 1a73c49f15cd1ab978e5cacd0ea84ecb + +pkgname = grumpy + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f1d61cd12f00 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Alexander F Rødseth <xyproto@archlinux.org> + +pkgname=grumpy +pkgver=r149.35d1202 +pkgrel=1 +pkgdesc='Grumpy is a Python to Go source code transcompiler and runtime' +arch=('x86_64' 'i686') +url='https://github.com/google/grumpy' +license=('Apache') +depends=('go' 'python2') +makedepends=('git' 'go' 'python2') +options=('!strip') +source=("git+https://github.com/google/grumpy.git" + 'makefile.patch') +md5sums=('SKIP' + '1a73c49f15cd1ab978e5cacd0ea84ecb') + +prepare() { + cd grumpy + patch -p1 -i ../makefile.patch +} + +build() { + PYTHON=python2 make -C grumpy -j2 +} + +package() { + PYTHON=python2 DESTDIR="$pkgdir" make -C grumpy install +} + +# vim:set ts=2 sw=2 et: diff --git a/makefile.patch b/makefile.patch new file mode 100644 index 000000000000..d3d1824ba1fb --- /dev/null +++ b/makefile.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index 100c00f..7a7fd38 100644 +--- a/Makefile ++++ b/Makefile +@@ -227,3 +227,19 @@ $(patsubst %,build/%.go,$(BENCHMARKS)): build/%.go: %.py $(COMPILER) + $(BENCHMARK_BINS): build/benchmarks/%_benchmark: build/benchmarks/%.go $(RUNTIME) $(STDLIB) + @mkdir -p $(@D) + @go build -o $@ $< ++ ++# ------------------------------------------------------------------------------ ++# Installation ++# ------------------------------------------------------------------------------ ++ ++install: ++ install -d $(DESTDIR)/usr/lib/go ++ install -d $(DESTDIR)/usr/bin ++ install -Dm755 tools/benchcmp $(DESTDIR)/usr/bin/benchcmp ++ install -Dm755 tools/coverparse $(DESTDIR)/usr/bin/coverparse ++ install -Dm755 tools/diffrange $(DESTDIR)/usr/bin/diffrange ++ install -Dm755 tools/grumpc $(DESTDIR)/usr/bin/grumpc ++ install -Dm755 tools/grumprun $(DESTDIR)/usr/bin/grumprun ++ cp -rv --no-preserve=ownership build/bin build/lib $(DESTDIR)/usr/ ++ cp -rv --no-preserve=ownership build/pkg build/src $(DESTDIR)/usr/lib/go/ ++ |