require_relative 'version'

class VarnishVmodQueryfilter < FPM::Cookery::Recipe
  name 'varnish-vmod-queryfilter'
  version '0.2.3'
  source "https://github.com/NYTimes/libvmod-queryfilter/archive/v#{version}.tar.gz"

  depends 'varnish'

  def build
    autogen
    ENV['VARNISHSRC'] = "../varnish-#{VERSION}"
    ENV['PYTHON'] = 'python'
    configure \
      '--disable-static'
    make
  end

  def install
    make :install, 'DESTDIR' => destdir
  end
end
