Skip to content

Commit

Permalink
Debian packaging. Patch by Lasse Karstensen.
Browse files Browse the repository at this point in the history
  • Loading branch information
daghf committed Sep 15, 2014
1 parent 33932d7 commit 2cb6a1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Source: libvmod-example
Source: libvmod-vsthrottle
Section: web
Priority: extra
Maintainer: Lasse Karstensen <lasse@varnish-software.com>
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
7 changes: 5 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

%:
Expand Down

0 comments on commit 2cb6a1f

Please sign in to comment.