summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMagnus Lång2017-08-26 13:27:07 +0200
committerMagnus Lång2017-08-26 14:20:39 +0200
commit2dff56337ee65b03479774c6045948d71b6a3d2b (patch)
treedbc8afa1faed0267f59e90bfd529e08c7de1d2d8 /PKGBUILD
downloadaur-2dff56337ee65b03479774c6045948d71b6a3d2b.tar.gz
Inital commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c0a905aea489
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Magnus Lång <magnus.lang@it.uu.se>
+pkgname=nidhugg-git
+pkgver=0.2.r21.ea22422
+pkgrel=1
+pkgdesc="A bug-finding tool for concurrency and weak-memory bugs in C and C++ programs"
+arch=('x86_64' 'i686')
+url="https://github.com/nidhugg/nidhugg"
+license=('GPL')
+depends=('python' 'clang')
+makedepends=('llvm'
+ 'boost') # For check() only
+provides=("nidhugg=$pkgver")
+conflicts=('nidhugg')
+source=("git://github.com/nidhugg/nidhugg.git#branch=master")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd nidhugg
+ # Versions are tracked not with git, but by updating the configure.ac file.
+ _vercommit="$(git blame --porcelain configure.ac | head -1 | cut -d' ' -f1)"
+ printf "%s.r%s.%s" \
+ "$(head -1 configure.ac | sed 's/AC_INIT(\[Nidhugg\], \[\([^]]*\)\].*/\1/')" \
+ "$(git rev-list --count $_vercommit..HEAD)" \
+ "$(git rev-parse --short $_vercommit)"
+}
+
+build() {
+ cd nidhugg
+ autoreconf -fi
+ export CXXFLAGS="$CXXFLAGS -isystem /usr/lib/libffi-3.2.1/include/"
+ export CFLAGS="$CFLAGS -isystem /usr/lib/libffi-3.2.1/include/"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "$srcdir/nidhugg"
+ make test
+}
+
+package() {
+ cd "$srcdir/nidhugg"
+ make DESTDIR="$pkgdir/" install
+}
+
+# vim:set ts=2 sw=2 et: