File: rules

package info (click to toggle)
pg-repack 1.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 752 kB
  • sloc: ansic: 4,836; sql: 375; makefile: 100; sh: 59
file content (27 lines) | stat: -rwxr-xr-x 958 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
#!/usr/bin/make -f

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

override_dh_auto_build:

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

override_dh_auto_install:
	+pg_buildext loop postgresql-%v-repack
	# Install an alternative for /usr/bin/pg_repack. We could wrap this
	# using pg_wrapper, but it doesn't matter which binary gets used (it
	# figures out the server version by itself), so we just use the one for
	# the newest server version.
	set -ex; \
	for v in $(shell pg_buildext supported-versions); do \
		i=$$(echo $$v | tr -d .); \
		echo "update-alternatives --install /usr/bin/pg_repack pg_repack /usr/lib/postgresql/$$v/bin/pg_repack $$i" >> debian/postgresql-$$v-repack.postinst.debhelper; \
		echo "update-alternatives --remove pg_repack /usr/lib/postgresql/$$v/bin/pg_repack" >> debian/postgresql-$$v-repack.prerm.debhelper; \
	done

override_dh_installdocs:
	dh_installdocs --all doc/*

%:
	dh $@