File: rules

package info (click to toggle)
pgagent 4.2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 476 kB
  • sloc: cpp: 1,913; sql: 1,739; xml: 100; ansic: 58; makefile: 31; sh: 18
file content (37 lines) | stat: -rwxr-xr-x 1,143 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

PGVERSIONS = $(shell pg_buildext supported-versions)
COMMA = ,

%:
	dh $@

# install extension files for the other PostgreSQL versions
override_dh_link:
	set -ex; \
	version=$$(basename debian/pgagent/usr/share/postgresql/*); \
	for v in $(PGVERSIONS); do \
		test $$v = $$version && continue; \
		mkdir -p debian/pgagent/usr/share/postgresql/$$v/extension; \
		(cd debian/pgagent/usr/share/postgresql/$$v/extension && \
			ln -vs ../../$$version/extension/* .); \
	done
ifneq ($(DEB_HOST_ARCH), hurd-i386)
ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	+PATH=$(CURDIR)/debian/pgagent/usr/bin:$(PATH) pg_buildext installcheck . test pgagent
endif
endif


override_dh_gencontrol:
	dh_gencontrol -- \
	  -VPostgresql:Recommends="$(patsubst %,postgresql-% |,$(PGVERSIONS))" \
	  -VPostgresql:Provides="$(patsubst %,postgresql-%-pgagent$(COMMA),$(PGVERSIONS))"

override_dh_auto_clean:
	dh_auto_clean
	# there is no "cmake clean" command
	rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake CPack* install_manifest.txt Makefile
	[ ! -f test/Makefile ] || $(MAKE) -C test clean