File: rules

package info (click to toggle)
libvmod-re2 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 948 kB
  • sloc: ansic: 1,514; cpp: 514; makefile: 124; sh: 76; ruby: 37
file content (35 lines) | stat: -rwxr-xr-x 1,031 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Extract varnishd VRT version
VARNISHD_VRT = $(shell \
	printf '$(H)include "vdef.h"\n$(H)include "vrt.h"\n%s.%s\n' \
		VRT_MAJOR_VERSION VRT_MINOR_VERSION | \
	cpp - -I/usr/include/varnish | \
	tail -1 | \
	tr -c -d '[0-9.]')

%:
	dh $@

override_dh_autoreconf:
	VARNISHAPI_DATAROOTDIR=$(shell pkg-config --variable=datadir varnishapi) dh_autoreconf

override_dh_auto_install:
	dh_auto_install
	# Empty dependency_libs field in .la files (c.f. Policy 10.2).
	sed -i "/dependency_libs/ s/'.*'/''/" `find $(installdir) -name '*.la'`
	rm -rf debian/varnish-re2/usr/share/doc/vmod-re2/

override_dh_auto_configure:
	dh_auto_configure -- --disable-tls

override_dh_gencontrol:
	echo "Varnish:ABI=varnishabi-$(VARNISHD_VRT)" >> debian/libvmod-re2.substvars
	dh_gencontrol