summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12018-11-17 16:03:55 +0800
committerChocobo12018-11-17 16:03:55 +0800
commit530ffb96e25f17944d3f8bd3f235d38e04bd1e13 (patch)
tree25f0893d24bbd7a8f80abc19de0164b6fbd52088
downloadaur-530ffb96e25f17944d3f8bd3f235d38e04bd1e13.tar.gz
newpkg: googletest-git 1.8.1.r244.gd5932506-1
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD62
2 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e0b099a0bad
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = googletest-git
+ pkgdesc = Google's C++ test framework
+ pkgver = 1.8.1.r244.gd5932506
+ pkgrel = 1
+ url = https://github.com/google/googletest
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ depends = gcc-libs
+ depends = sh
+ provides = gmock
+ provides = gtest
+ conflicts = gmock
+ conflicts = gtest
+ source = git+https://github.com/google/googletest.git
+ sha256sums = SKIP
+
+pkgname = googletest-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e89e433feec
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=googletest-git
+pkgver=1.8.1.r244.gd5932506
+pkgrel=1
+pkgdesc="Google's C++ test framework"
+arch=('i686' 'x86_64')
+url="https://github.com/google/googletest"
+license=('BSD')
+depends=('gcc-libs' 'sh')
+makedepends=('git' 'cmake')
+provides=('gmock' 'gtest')
+conflicts=('gmock' 'gtest')
+source=("git+https://github.com/google/googletest.git")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "googletest"
+
+ git describe --long --tags | sed 's/^release-//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir"
+
+ mkdir -p "build" && cd "build"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DCMAKE_INSTALL_LIBDIR="lib" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_SHARED_LIBS=ON \
+ -Dgtest_build_tests=ON \
+ ../"googletest"
+ make
+
+ # For g{test,mock}-config
+ cd "$srcdir/googletest"
+ autoreconf -fi
+ ./configure --prefix="/usr"
+ make
+}
+
+check() {
+ cd "googletest"
+
+ #make -C "$srcdir/build" test
+}
+
+package() {
+ cd "$srcdir"
+
+ make -C "build" DESTDIR="$pkgdir" install
+
+ cd "$srcdir/googletest"
+ install -Dm755 "googletest/scripts/gtest-config" -t "$pkgdir/usr/bin"
+ install -Dm755 "googlemock/scripts/gmock-config" -t "$pkgdir/usr/bin"
+
+ install -Dm644 "googletest/m4/gtest.m4" -t "$pkgdir/usr/share/aclocal"
+
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/gtest/LICENSE"
+}