[master] b6b5546 Add ABI Provide-s.

Lasse Karstensen lkarsten at varnish-software.com
Thu Nov 27 18:09:17 CET 2014


commit b6b554626dc830d83e1705638882fd549693fa5d
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Thu Nov 27 18:07:36 2014 +0100

    Add ABI Provide-s.

diff --git a/control b/control
index 81f4f78..ca29224 100644
--- a/control
+++ b/control
@@ -27,8 +27,10 @@ Standards-Version: 3.9.3
 
 Package: varnish
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, gcc ( >= 3.3), libc6-dev | libc6.1-dev | libc-dev, adduser, libvarnishapi1 (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, gcc (>= 3.3), libc6-dev | libc6.1-dev | libc-dev, adduser, libvarnishapi1 (>= ${binary:Version})
 Suggests: varnish-doc
+Provides: ${Varnish:ABI}
+Provides: ${Varnish:strictABI}
 Description: state of the art, high-performance web accelerator
  Varnish Cache is a state of the art web accelerator written with
  performance and flexibility in mind.
diff --git a/rules b/rules
index 5ff61d6..f3c65a4 100755
--- a/rules
+++ b/rules
@@ -18,6 +18,14 @@ ifneq ($(filter $(DEB_HOST_ARCH),$(DISABLE_JEMALLOC_ARCH_LIST)),)
 LOCAL_CONFIGURE_FLAGS += --disable-jemalloc
 endif
 
+VMOD_strictABI = $(shell printf '\#include "vmod_abi.h"\nVMOD_ABI_Version\n' \
+        | cpp - -Iinclude \
+        | sed -e '/"Varnish/!d' -e 's/.*\ \(.*\)\"$/varnishabi-strict-\1/')
+
+VMOD_ABI = $(shell printf '\#include "vrt.h"\nvarnishabi- VRT_MAJOR_VERSION . VRT_MINOR_VERSION\n' \
+        | cpp - -Iinclude \
+        | sed -e '/^varnishabi-/!d' -e 's/U//g' -e 's/ //g')
+
 # Main build rule, leave everything to debhelper
 %:
 	dh $@ --parallel
@@ -64,10 +72,13 @@ override_dh_installdocs:
 	fi
 
 override_dh_gencontrol:
+	echo "Varnish:strictABI=$(VMOD_strictABI)" >> debian/substvars
+	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
 
 # Override to add several init scripts



More information about the varnish-commit mailing list