aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-28 02:25:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-03-28 02:38:30 +0200
commitc4dd51f18b4c1f34cda6e45cf530354373a0b750 (patch)
tree98cb2df03af105bf35d55240935732828e498f9b /testing
parentec1d62b2f096af4ba6ecc5d351305ca64d7fd64c (diff)
downloadaports-c4dd51f18b4c1f34cda6e45cf530354373a0b750.tar.bz2
aports-c4dd51f18b4c1f34cda6e45cf530354373a0b750.tar.xz
testing/ameba: new aport
https://github.com/veelenga/ameba
Diffstat (limited to 'testing')
-rw-r--r--testing/ameba/APKBUILD33
-rw-r--r--testing/ameba/fix-makefile.patch27
2 files changed, 60 insertions, 0 deletions
diff --git a/testing/ameba/APKBUILD b/testing/ameba/APKBUILD
new file mode 100644
index 0000000000..f9b226807c
--- /dev/null
+++ b/testing/ameba/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ameba
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="A static code analysis tool for Crystal"
+url="https://github.com/veelenga/ameba"
+arch="x86_64 aarch64" # limited by crystal
+license="MIT"
+makedepends="crystal libxml2-dev shards yaml-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/veelenga/$pkgname/archive/v$pkgver.tar.gz
+ fix-makefile.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+export CRYSTAL_CACHE_DIR="$srcdir/.cache"
+
+build() {
+ cd "$builddir"
+ make CRFLAGS="--release"
+}
+
+check() {
+ cd "$builddir"
+ make test SPEC_FLAGS="--no-color"
+}
+
+package() {
+ cd "$builddir"
+ make install PREFIX="$pkgdir/usr"
+}
+
+sha512sums="12498c3ea90ee1c31ce7f45b3addf7bc1fb192223eaca4fb1e80483272f4695175cec40be6c6d3d3b8b61113c0e625e65ac0845b7ea14de2bab51f91473d7522 ameba-0.5.0.tar.gz
+dde379039eebda0ea67e5a95d74af0980b316b77ca7ac426e307578358030702488a6e1e7ba70b490a5aa1eb53e144ad348cb4d75717b3601f8e8ea73b36a5fa fix-makefile.patch"
diff --git a/testing/ameba/fix-makefile.patch b/testing/ameba/fix-makefile.patch
new file mode 100644
index 0000000000..a2ed851d74
--- /dev/null
+++ b/testing/ameba/fix-makefile.patch
@@ -0,0 +1,27 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,16 +2,19 @@
+ PREFIX ?= /usr/local
+ SHARD_BIN ?= ../../bin
+
+-build:
++.PHONY: build
++build: bin/ameba
++
++bin/ameba:
+ $(CRYSTAL_BIN) build --no-debug -o bin/ameba src/cli.cr $(CRFLAGS)
+ clean:
+ rm -f ./bin/ameba
+-install: build
++install: bin/ameba
+ mkdir -p $(PREFIX)/bin
+ cp ./bin/ameba $(PREFIX)/bin
+-bin: build
++bin: bin/ameba
+ mkdir -p $(SHARD_BIN)
+ cp ./bin/ameba $(SHARD_BIN)
+-test: build
+- $(CRYSTAL_BIN) spec
++test: bin/ameba
++ $(CRYSTAL_BIN) spec $(SPEC_FLAGS)
+ ./bin/ameba