#!/usr/bin/make -f 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 override_dh_gencontrol: dh_gencontrol -- \ -VPostgresql:Depends="$(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 $(MAKE) -C test clean rm -f test/pgagent.out