# Depends on: libedit pcre python2-docutils

description="Varnish is a web application accelerator."
url="http://www.varnish-cache.org/"
packager="alieanus at nutyx dot org, tnut at nutyx dot org"
name=varnish
version=4.1.2
release=1

source=(
http://repo.varnish-cache.org/source/$name-$version.tar.gz
varnish.service)

build(){
    cd $name-$version
    # https://github.com/varnish/Varnish-Cache/pull/88
    [[ $PKGMK_ARCH == i686 ]] && CFLAGS+=' -ffloat-store -fexcess-precision=standard'
    ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var/lib
    make
    make DESTDIR=$PKG install

    # install the varnish init script
    install -Dm755 $SRC/$name.service $PKG/etc/rc.d/init.d/$name
}
