File: rules

package info (click to toggle)
havp 0.93-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,348 kB
  • sloc: cpp: 7,473; sh: 474; makefile: 101
file content (50 lines) | stat: -rwxr-xr-x 1,414 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# Get the hardening build flags and enable all compiler warnings:
CFLAGS   := $(shell dpkg-buildflags --get CFLAGS) -Wall
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)

CONFIG := CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
	--enable-ssl-tunnel

ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
	CONFIG += --disable-locking
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIG)

override_dh_auto_build-arch:
	dh_auto_build -a
	docbook-to-man debian/havp.sgml > havp.1

override_dh_auto_clean:
	debconf-updatepo
	dh_auto_clean

override_dh_install:
	dh_install -a

	# clean up to make lintian shut up...
	rm -r $(CURDIR)/debian/havp/var/tmp $(CURDIR)/debian/havp/var/run
	chmod -x $(CURDIR)/debian/havp/etc/havp/templates/*/*.html

override_dh_installinit:
	dh_installinit --error-handler=init_error

override_dh_installman:
	dh_installman havp.1