[master] 7b69a1d Make RPM Provide: $varnishabi
Tollef Fog Heen
tfheen at varnish-cache.org
Fri Nov 1 13:34:22 CET 2013
commit 7b69a1dec56c1834a001cbbd72b94f7e12ab2daf
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Fri Nov 1 13:33:38 2013 +0100
Make RPM Provide: $varnishabi
We want VMODs to depend on the right ABI, so we need to provide
something they can depend on. Do so, and hook that up with the RPM
build process.
diff --git a/redhat/Makefile.am b/redhat/Makefile.am
index 16ff9d6..ceac128 100644
--- a/redhat/Makefile.am
+++ b/redhat/Makefile.am
@@ -13,4 +13,5 @@ EXTRA_DIST = \
varnish.params \
varnish.service \
varnishncsa.service \
- varnishlog.service
+ varnishlog.service \
+ find-provides
diff --git a/redhat/find-provides b/redhat/find-provides
new file mode 100755
index 0000000..bf3ed59
--- /dev/null
+++ b/redhat/find-provides
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+# This script is used to inject the Varnish ABI into the provides.
+
+set -x
+
+if [ -x /usr/lib/rpm/find-requires ]; then
+ /usr/lib/rpm/find-requires "$@"
+fi
+
+cd $(dirname $0)/..
+
+printf '#include "vmod_abi.h"\nVMOD_ABI_Version' | cpp - -Iinclude | sed '/^#/D;s/"//g;s/\([A-Z]\)/\L\1/g;s/[^a-z0-9.]/-/g;s/varnish/varnishabi/'
diff --git a/redhat/varnish.spec b/redhat/varnish.spec
index a489486..e12da5a 100644
--- a/redhat/varnish.spec
+++ b/redhat/varnish.spec
@@ -1,6 +1,7 @@
%define v_rc
%define vd_rc %{?v_rc:-%{?v_rc}}
-
+%define _use_internal_dependency_generator 0
+%define __find_provides %{_builddir}/varnish-%{version}%{?v_rc:-%{?v_rc}}/redhat/find-provides
Summary: High-performance HTTP accelerator
Name: varnish
Version: 4.0.0
More information about the varnish-commit
mailing list