mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
# Maintainer: Weng Xuetian <wengxt@gmail.com>
|
|
|
|
pkgbase=googletest
|
|
pkgname=('gtest' 'gmock')
|
|
pkgver=1.8.0
|
|
_pkgver=release-$pkgver
|
|
pkgrel=2
|
|
arch=('x86_64')
|
|
license=('BSD')
|
|
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*
|
|
}
|