File: rules

package info (click to toggle)
pgpool2 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 18,196 kB
  • sloc: ansic: 79,290; sh: 15,489; yacc: 13,190; lex: 2,158; java: 844; makefile: 817; sql: 779; php: 125; ruby: 94
file content (70 lines) | stat: -rwxr-xr-x 2,457 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f

include /usr/share/postgresql-common/pgxs_debian_control.mk

LDFLAGS += -Wl,--as-needed

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C src/sql clean
	rm -f config.log
	$(MAKE) -C src/sql/pgpool_adm clean USE_PGXS=1
	rm -rf src/test/jdbc/*.class src/test/jdbc/result src/test/jdbc/pgpool.properties
	# tests disabled because they have been broken in commit cdb49d3
	#$(MAKE) -C src/test/parser clean
	#rm -rf src/test/parser/result src/test/parser/test.diff
	#$(MAKE) -C src/test/timestamp clean
	#rm -rf src/test/timestamp/result src/test/timestamp/test.diff
	cd src/test/regression && bash clean.sh
	rm -rf debian/postgresql-*-pgpool2/ debian/*.substvars

override_dh_auto_configure:
	./configure --prefix=/usr \
		--sysconfdir=/etc/pgpool2 \
		--bindir=/usr/sbin \
		--includedir=/usr/include/pgpool2 \
		--disable-rpath \
		--with-openssl \
		--with-pam \
		--with-memcached=/usr/include/libmemcached
	# create directory here so we can unlink it in case autopkgtest leaves files owned by root behind
	mkdir -p src/test/jdbc/result

override_dh_auto_test:
	dh_auto_test
	# tests disabled because they have been broken in commit cdb49d3
	#$(MAKE) -C src/test/parser test
	#chmod +x src/test/timestamp/run-test
	#$(MAKE) -C src/test/timestamp test
	# src/test/jdbc is executed by autopkgtest

override_dh_auto_install:
	dh_auto_install
	set -e ; \
	for v in `pg_buildext supported-versions .` ; do \
		echo "# $$v ##################################################################" ; \
		PG_CONFIG=/usr/lib/postgresql/$$v/bin/pg_config ; \
		$(MAKE) -C src/sql clean PG_CONFIG=$$PG_CONFIG ; \
		$(MAKE) -C src/sql PG_CONFIG=$$PG_CONFIG ; \
		chrpath -d src/sql/pgpool_adm/pgpool_adm.so ; \
		$(MAKE) -C src/sql install DESTDIR=$(CURDIR)/debian/postgresql-$$v-pgpool2 PG_CONFIG=$$PG_CONFIG ; \
	done

override_dh_install:
	# pgpool.conf is handled by ucf
	mkdir -p debian/tmp/usr/share/pgpool2
	mv debian/tmp/etc/pgpool2/pgpool.conf.sample debian/tmp/usr/share/pgpool2/pgpool.conf
	set -e ; for f in pcp.conf pool_hba.conf ; do mv debian/tmp/etc/pgpool2/$$f.sample debian/tmp/etc/pgpool2/$$f ; done
	rm debian/tmp/usr/lib/libpcp.la # not interested in .la
	dh_install --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS

%:
# use dh_systemd_* only on recent dists that have dh-systemd (>= 1.19)
ifneq ($(wildcard /usr/bin/dh_systemd_start),)
	dh $@ --with autoreconf,systemd
else
	dh $@ --with autoreconf
endif