From 29230096898cf6d6637e45e91c28196c05d03d78 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 28 Oct 2024 00:46:23 +0100 Subject: [PATCH] deb: place bash completion at correct path, using debhelper (#839) fixes https://github.com/zrepl/zrepl/issues/794 --- packaging/deb/Dockerfile | 1 + packaging/deb/debian/control | 2 +- packaging/deb/debian/rules | 7 ++++--- packaging/deb/debian/zrepl.bash-completion | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 packaging/deb/debian/zrepl.bash-completion diff --git a/packaging/deb/Dockerfile b/packaging/deb/Dockerfile index d88040b..5ea7de8 100644 --- a/packaging/deb/Dockerfile +++ b/packaging/deb/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y \ build-essential \ devscripts \ dh-exec \ + bash-completion \ binutils-aarch64-linux-gnu \ binutils-arm-linux-gnueabihf \ binutils-i686-linux-gnu \ diff --git a/packaging/deb/debian/control b/packaging/deb/debian/control index 424dfbd..4b8235d 100644 --- a/packaging/deb/debian/control +++ b/packaging/deb/debian/control @@ -1,6 +1,6 @@ Source: zrepl Maintainer: Christian Schwarz -Build-Depends: dh-exec +Build-Depends: dh-exec, bash-completion Package: zrepl Architecture: arm64 amd64 armhf i386 diff --git a/packaging/deb/debian/rules b/packaging/deb/debian/rules index c05e491..c49f92b 100755 --- a/packaging/deb/debian/rules +++ b/packaging/deb/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ + dh $@ --with bash-completion override_dh_strip: @@ -26,8 +26,9 @@ override_dh_auto_install: cp --preserve=all artifacts/$(ZREPL_DPKG_ZREPL_BINARY_FILENAME) debian/renamedir/zrepl dh_install debian/renamedir/zrepl usr/bin - # install bash completion - dh_install artifacts/bash_completion etc/bash_completion.d/zrepl + # install zsh completions + # NB: bash completion auto-magic via dh_bash-completion + # TODO: unify on https://tracker.debian.org/pkg/dh-shell-completions when available dh_install artifacts/_zrepl.zsh_completion usr/share/zsh/vendor-completions # install docs diff --git a/packaging/deb/debian/zrepl.bash-completion b/packaging/deb/debian/zrepl.bash-completion new file mode 100644 index 0000000..0d7c495 --- /dev/null +++ b/packaging/deb/debian/zrepl.bash-completion @@ -0,0 +1 @@ +artifacts/bash_completion zrepl