#Maintainer: Nathan O <ndowens.aur at gmail dot com> 
pkgname=bes
pkgver=3.8.4
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="A high-performance back-end server software framework that allows data providers more flexibility in providing end users views of their data"
url="http://www.opendap.org/download/BES.html"
license=("LGPL")
depends=('libxml2' 'bzip2' 'openssl' 'bash')
options=('!libtool')
source=(http://www.opendap.org/pub/source/$pkgname-$pkgver.tar.gz sslserver.patch sslclient.patch)
md5sums=('18d182bdcc266243908e9202511b0450'
         'f9b2826276040c95a5a32afc7a3352e1'
         'f5e981d9c0cb54c9133d07ab5d84e556')
		
build() {
	install -d ${pkgdir}/etc/rc.d
  cd ${srcdir}/${pkgname}-${pkgver}/ppt
  patch -Np0 -i ${srcdir}/sslclient.patch
  patch -Np0 -i ${srcdir}/sslserver.patch
  
  cd ${srcdir}/${pkgname}-${pkgver}
  FC=gfortran F77=gfortran 

  ./configure --prefix=/usr/ --sysconfdir=/etc --localstatedir=/var
  make 
  make DESTDIR=${pkgdir} install
  install -D ${pkgdir}/usr/bin/besd ${pkgdir}/etc/rc.d/besd
}
