summaryrefslogtreecommitdiff
path: root/community/gtest/PKGBUILD
blob: 9d1005c32f7e04245a7d7ea89795f9ef021b6caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id: PKGBUILD 99792 2013-10-30 23:44:46Z allan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Alexandre Bique <bique.alexandre@gmail.com>
# Contributor: Louis R. Marascio <lrm@fitnr.com>
# Contributor: Cody Maloney <cmaloney@theoreticalchaos.com>

pkgname=gtest
pkgver=1.7.0
pkgrel=1
pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit)"
arch=('i686' 'x86_64')
url="http://code.google.com/p/googletest/"
license=('custom:BSD3')
depends=('gcc-libs' 'sh')
makedepends=('python2' 'cmake')
source=("http://googletest.googlecode.com/files/$pkgname-$pkgver.zip")

build() {
  cd "$srcdir/$pkgname-$pkgver"

  rm -rf build
  mkdir build
  cd build

  cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON ..
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  mkdir -pm 0755 "$pkgdir"/usr/{lib,include/gtest/internal,share/licenses/$pkgname,src/gtest/src,src/gtest/cmake}
  install -m 0644 build/libgtest{,_main}.so "$pkgdir"/usr/lib
  install -m 0644 include/gtest/*.h "$pkgdir"/usr/include/gtest
  install -m 0644 include/gtest/internal/*.h "$pkgdir"/usr/include/gtest/internal/
  install -m 0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
  install -m 0644 "$srcdir/$pkgname-$pkgver/fused-src/gtest"/* "$pkgdir"/usr/src/gtest/src/
  install -m 0644 "$srcdir/$pkgname-$pkgver/CMakeLists.txt" "$pkgdir"/usr/src/gtest/
  install -m 0644 "$srcdir/$pkgname-$pkgver/cmake"/* "$pkgdir"/usr/src/gtest/cmake/
}

# vim:set ts=2 sw=2 et:
sha512sums=('8859369f2dd32cbc2ac01aba029aa3ff20a321f40658b9643aff442d34c33468221866b801b28c66a28af47dbcd362d26941fc98db92b6efb7e41ea5b7be1a07')