diff --git a/debian/control b/debian/control index 4ea4598..dee5216 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: libvmod-example +Source: libvmod-vsthrottle Section: web Priority: extra Maintainer: Lasse Karstensen @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7), build-essential, python-docutils Standards-Version: 3.8.1 Vcs-Git: git://github.com/varnish/libvmod-example.git -Package: libvmod-example +Package: libvmod-vsthrottle Architecture: any -Depends: varnish, ${misc:Depends} -Description: Example vmod for Varnish +Depends: varnish, ${Varnish:ABI}, ${misc:Depends} +Description: Request throttling VMOD for Varnish diff --git a/debian/rules b/debian/rules index 82ac88f..1f75863 100755 --- a/debian/rules +++ b/debian/rules @@ -3,15 +3,18 @@ export DH_VERBOSE=1 VARNISHSRC = $(DEBIAN_VARNISH_SRC) VMODDIR = $(shell PKG_CONFIG_PATH="$(VARNISHSRC)" pkg-config --variable=vmoddir varnishapi) +VMOD_ABI = $(shell printf '\#include "vmod_abi.h"\nVMOD_ABI_Version' | cpp - -I$(DEBIAN_VARNISH_SRC)/include | sed '/^\#/D;s/"//g;s/\([A-Z]\)/\L\1/g;s/[^a-z0-9.]/-/g;s/varnish/varnishabi/') override_dh_auto_configure: dh_auto_configure -- VMODDIR="$(VMODDIR)" VARNISHSRC="$(VARNISHSRC)" override_dh_gencontrol: + echo "Varnish:ABI=$(VMOD_ABI)" >> debian/substvars + if [ -n "$$DEBIAN_OVERRIDE_BINARY_VERSION" ]; then \ - dh_gencontrol -- -v$$DEBIAN_OVERRIDE_BINARY_VERSION; \ + dh_gencontrol -- -Tdebian/substvars -v$$DEBIAN_OVERRIDE_BINARY_VERSION; \ else \ - dh_gencontrol ; \ + dh_gencontrol -- -Tdebian/substvars; \ fi %: