# Maintainer: Weng Xuetian # Contributor: Alexandre Bique # Contributor: Louis R. Marascio # Contributor: Cody Maloney pkgbase=googletest pkgname=('gtest' 'gmock') pkgver=1.8.0 _pkgver=release-$pkgver pkgrel=1 arch=('x86_64') license=('BSD') options=('!libtool') makedepends=('cmake' 'python2') source=("$pkgbase-$pkgver.tar.gz::https://github.com/google/googletest/archive/$_pkgver.tar.gz") sha256sums=('58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8') build() { cd $srcdir/$pkgbase-$_pkgver [[ -d build ]] && rm -r build mkdir build && cd build cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_SKIP_RPATH=ON \ .. make } package_gtest() { pkgdesk="Google Test - C++ testing utility based on the xUnit framework (like JUnit)" url="https://github.com/google/googletest/blob/master/googletest/" cd $srcdir/$pkgbase-$_pkgver/build make DESTDIR=$pkgdir install rm -rf $pkgdir/usr/include/gmock $pkgdir/usr/lib/*gmock* } package_gmock() { pkgdesc="Google Mock - A library for writing and using C++ mock classes" url="https://github.com/google/googletest/blob/master/googlemock/" depends=('gtest' 'python2') cd $srcdir/$pkgbase-$_pkgver/build make DESTDIR=$pkgdir install rm -rf $pkgdir/usr/include/gtest $pkgdir/usr/lib/*gtest* }