summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c68fde72df25b6566932cd6553b51814f1521bf0 (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
# Maintainer: Daichi Shinozaki <dsdseg@gmail.com>
pkgname=fbthrift
pkgver=2017.03.20.00
pkgrel=2
pkgdesc="Facebook's branch of Apache Thrift, including a new C++ server"
arch=('i686' 'x86_64')
url="https://github.com/facebook/fbthrift"
license=('Apache')
depends=('folly' 'krb5' 'numactl' 'python2')
conflicts=('thrift')
provides=('thrift')
makedepends=('scons' 'zstd' 'libunwind')
options=('!emptydirs' 'staticlibs')
source=("https://github.com/facebook/$pkgname/archive/v${pkgver}.tar.gz")
md5sums=('eb8b04def043e4b897e5ce1617695486')

prepare() {
  cd "$pkgname-$pkgver/thrift"
  sed -ie '1 s/python/python2/' ./compiler/py/main.py
  # ArchLinux system has both libboost_python.so and libboost3_python.so.
  # Use python2 for build, so prevent libboost3_python.so to be chosen
  sed -i -e 's/libboost_python\*.so\*/libboost_python.so\*/' ./m4/ax_boost_python.m4
  autoreconf -ivf 
}

build() {
  cd "$pkgname-$pkgver/thrift"
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr
  sed --in-place -e 's/python\( -mthrift_compiler.main\)/python2 \1/g' ./lib/cpp2/Makefile
  make
}

#check() {
#  cd "$pkgname-$pkgver/thrift"
#  make check
#}

package() {
  cd "$pkgname-$pkgver/thrift"
  make \
    PY_INSTALL_HOME="$pkgdir/usr" \
    PY_INSTALL_ARGS="--root '${pkgdir}' --prefix=/usr" \
    DESTDIR="$pkgdir" \
    install
}