[3.0] 33d6063 Make RPM Provide: $varnishabi
Tollef Fog Heen
tfheen at varnish-cache.org
Tue Nov 12 15:07:13 CET 2013
commit 33d6063ce82113c3edd4e8606d83247f54313c09
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 86ddfd4..48294d7 100644
--- a/redhat/Makefile.am
+++ b/redhat/Makefile.am
@@ -9,4 +9,5 @@ EXTRA_DIST = \
varnish.spec \
varnish.sysconfig \
varnishlog.initrc \
- varnishncsa.initrc
+ varnishncsa.initrc \
+ 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 0f69cc6..5ede7fd 100644
--- a/redhat/varnish.spec
+++ b/redhat/varnish.spec
@@ -1,3 +1,5 @@
+%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: 3.0.4
More information about the varnish-commit
mailing list