# $Id: PKGBUILD 117916 2014-08-26 15:10:46Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Jeff Mickey <jeff@archlinux.org>

pkgname=tcpflow
pkgver=1.4.4
pkgrel=2
pkgdesc="Captures data transmitted as part of TCP connections then stores the data conveniently"
arch=('i686' 'x86_64')
url="http://afflib.org/software/tcpflow"
license=('GPL')
depends=('libpcap' 'cairo')
makedepends=('git' 'boost')
source=("git+https://github.com/simsong/$pkgname.git#tag=$pkgname-$pkgver"
        'git+https://github.com/simsong/be13_api.git'
        'git+https://github.com/simsong/dfxml.git'
        'git+https://github.com/joyent/http-parser.git'
        'FS41697.patch')
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'b4e66e456beffe28414e55fee913a84c')

prepare() {
  cd $pkgname
  git submodule init
  git config submodule."src/be13_api".url "$srcdir/be13_api"
  git config submodule."src/dfxml".url "$srcdir/dfxml"
  git config submodule."src/http-parser".url "$srcdir/http-parser"
  git submodule update

  patch -p1 -i ../FS41697.patch
}

build() {
  cd $pkgname
  sh bootstrap.sh
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

