File: rules

package info (click to toggle)
pg-auto-failover 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,368 kB
  • sloc: ansic: 58,369; python: 5,515; sql: 3,177; makefile: 629; sh: 35
file content (35 lines) | stat: -rwxr-xr-x 960 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

CLINAME := $(lastword $(shell grep "Package: pg-auto-failover-cli" debian/control))

include /usr/share/dpkg/pkg-info.mk
include /usr/share/postgresql-common/pgxs_debian_control.mk

export USE_SECURITY_FLAGS := 1

clean: debian/control

.PHONY: debian/control

override_dh_auto_build:
	echo "#define GIT_VERSION \"$(DEB_VERSION)\"" > src/bin/pg_autoctl/git-version.h
	+make -C $(shell pwd)/src/bin/pg_autoctl
	+pg_buildext build $(shell pwd)/src/monitor build-%v
	+make man

override_dh_auto_clean:
	+make -C $(shell pwd)/src/bin/pg_autoctl clean
	+pg_buildext clean $(shell pwd)/src/monitor build-%v

override_dh_auto_test:
	# nothing to do here, see debian/tests/* instead

override_dh_auto_install:
	+make -C $(shell pwd)/src/bin/pg_autoctl install \
		DESTDIR=$(CURDIR)/debian/${CLINAME} \
		BINDIR=/usr/bin
	+pg_buildext install $(shell pwd)/src/monitor build-%v postgresql-%v-auto-failover
	dh_installman docs/_build/man/*

%:
	dh $@