diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:35:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:35:12 +0000 |
commit | f06340a3d93a12d610416030f0b8c766bfee63ca (patch) | |
tree | 8d9c4eeec6afd2dc01aa6a17435a4f63c3e769d5 /debian/rules | |
parent | Adding upstream version 258. (diff) | |
download | postgresql-common-f06340a3d93a12d610416030f0b8c766bfee63ca.tar.xz postgresql-common-f06340a3d93a12d610416030f0b8c766bfee63ca.zip |
Adding debian version 258.debian/258
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b7f6b22 --- /dev/null +++ b/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/pkg-info.mk + +ifneq ($(findstring bpo,$(DEB_VERSION)),) + FLAVOR := debian-backports +else ifneq ($(findstring pgdg,$(DEB_VERSION)),) + FLAVOR := pgdg +else + FLAVOR := default +endif +SUPPORTED_VERSIONS := $(shell PG_SUPPORTED_VERSIONS="$(FLAVOR)" debian/supported-versions) +DEFAULT_VER := $(lastword $(SUPPORTED_VERSIONS)) + +#py2#PYTHON2_PACKAGE=postgresql-plpython-$v + +%: + dh $@ + +override_dh_auto_configure: + @echo "### Building postgresql-common flavor $(FLAVOR)" + @echo "### Supported PostgreSQL versions: $(SUPPORTED_VERSIONS) (default version: $(DEFAULT_VER))" + echo "# See /usr/share/postgresql-common/supported-versions for documentation of this file" > supported_versions + echo "$(FLAVOR)" >> supported_versions + +# do not restart postgresql.service on postgresql-common upgrades +override_dh_installinit: + dh_installinit -ppostgresql-common --name=postgresql -u'defaults 19 21' --no-stop-on-upgrade +override_dh_installsystemd: + dh_installsystemd --no-stop-on-upgrade + # move unit files to /usr on systems that support it + if test -x /usr/bin/dh_movetousr; then dh_movetousr; fi + +override_dh_gencontrol: + dh_gencontrol -ppostgresql-server-dev-all -- -Vserver-dev-all-depends="$(foreach v,$(SUPPORTED_VERSIONS),postgresql-server-dev-$v,)" + + # the versionless metapackages need to have version numbers which match + # the server version, not the p-common version + dh_gencontrol -ppostgresql -ppostgresql-client -ppostgresql-doc -ppostgresql-contrib -- \ + -Vdefault-version="$(DEFAULT_VER)" -v'$(DEFAULT_VER)+$${source:Version}' + + dh_gencontrol -ppostgresql-all -- \ + -Vpostgresql-all-depends="$(foreach v,$(SUPPORTED_VERSIONS),postgresql-contrib-$v,postgresql-plperl-$v,$(if $(filter 8.% 9.% 10 11, $v), $(PYTHON2_PACKAGE)),postgresql-plpython3-$v,postgresql-pltcl-$v,)" + + dh_gencontrol --remaining-packages |