summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b46d84b8fc9a16acc7c62700766023a453f3123e (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=wdt-git
pkgver=1.27.1612021.r132.g1f43a96
pkgrel=1
pkgdesc="Tool to transfer data between 2 systems as fast as possible over multiple TCP paths"
arch=('i686' 'x86_64')
url="https://github.com/facebook/wdt"
license=('BSD')
depends=('glibc' 'bash' 'double-conversion' 'gflags' 'google-glog' 'openssl')
makedepends=('git' 'cmake' 'boost')
optdepends=('jemalloc')
checkdepends=('gtest')
provides=('wdt')
conflicts=('wdt')
source=("git+https://github.com/facebook/wdt.git")
sha256sums=('SKIP')


prepare() {
  cd "$srcdir"

  rm -rf "folly"
  git clone "https://github.com/facebook/folly.git"
  cd "folly"
  git checkout "$(git describe --abbrev=0 --always)"

  cd "$srcdir/wdt"
  mkdir -p "_build"
}

pkgver() {
  cd "wdt"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/wdt/_build"

  cmake -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE=Release ../
  make
}

check() {
  cd "$srcdir/wdt/_build"

  #CTEST_OUTPUT_ON_FAILURE=1 make test
}

package() {
  cd "$srcdir/wdt/_build"

  make DESTDIR="$pkgdir" install
  install -Dm644 "../LICENSE" "$pkgdir/usr/share/licenses/wdt/LICENSE"
}