summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
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 00000000000..c0a905aea48
--- /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: