summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Zenker2016-11-04 11:24:33 +0100
committerErik Zenker2016-11-04 11:24:33 +0100
commit1ccbcb33a2b5ce4a8de2366063d54769987f8d8b (patch)
tree15b2dc81aa24cc5917330ed48eb6ad8d74b52091
downloadaur-1ccbcb33a2b5ce4a8de2366063d54769987f8d8b.tar.gz
Google benchmark framework directly from git
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD46
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a5ccde0fcf3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = benchmark-git
+ pkgdesc = A microbenchmark support library, by Google
+ pkgver = v1.0.0.r240.g4f8bfea
+ pkgrel = 1
+ url = https://github.com/google/benchmark}
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = cmake
+ depends = gcc-libs
+ source = benchmark-git::git+https://github.com/google/benchmark.git
+ sha256sums = SKIP
+
+pkgname = benchmark-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..26151b95040
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Erik Zenker <erikzenker at posteo dot de>
+pkgname=benchmark-git
+pkgver=v1.0.0.r240.g4f8bfea
+pkgrel=1
+pkgdesc="A microbenchmark support library, by Google"
+arch=('i686' 'x86_64')
+url="https://github.com/google/benchmark}"
+license=('Apache')
+depends=(gcc-libs)
+makedepends=('cmake')
+
+source=("${pkgname}::git+https://github.com/google/benchmark.git")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+ sed -i "s|v0.0.0|v${pkgver}|g" "cmake/GetGitVersion.cmake"
+
+ mkdir -p build && cd build
+
+ cmake .. -DCMAKE_BUILD_TYPE="Release" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=ON \
+ -DBENCHMARK_ENABLE_LTO=ON
+}
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${srcdir}/${pkgname}/build"
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}/build"
+ make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}/build"
+ make DESTDIR="$pkgdir/" install
+}