From 1da2ca9044226f55e209e09f17f4ae6a46531c2a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 18 Apr 2021 00:57:36 -0400 Subject: package completion files with the debian package --- Cargo.toml | 8 ++++++++ Makefile | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cbeac72..3f4dff0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,3 +57,11 @@ zeroize = "1.2" [package.metadata.deb] depends = "pinentry" license-file = ["LICENSE"] +assets = [ + ["target/release/rbw", "usr/bin/", "755"], + ["target/release/rbw-agent", "usr/bin/", "755"], + ["target/release/completion/bash", "usr/share/bash-completion/completions/rbw", "644"], + ["target/release/completion/zsh", "usr/share/zsh/vendor-completions/_rbw", "644"], + ["target/release/completion/fish", "usr/share/fish/completions/rbw.fish", "644"], + ["README.md", "usr/share/doc/rbw/README", "644"], +] diff --git a/Makefile b/Makefile index 6ba6476..cedf8b5 100644 --- a/Makefile +++ b/Makefile @@ -34,13 +34,20 @@ cleanall: clean @cargo clean .PHONY: cleanall +completion: release + @mkdir -p target/x86_64-unknown-linux-musl/release/completion + @./target/x86_64-unknown-linux-musl/release/rbw gen-completions bash > target/x86_64-unknown-linux-musl/release/completion/bash + @./target/x86_64-unknown-linux-musl/release/rbw gen-completions zsh > target/x86_64-unknown-linux-musl/release/completion/zsh + @./target/x86_64-unknown-linux-musl/release/rbw gen-completions fish > target/x86_64-unknown-linux-musl/release/completion/fish +.PHONY: completion + package: pkg/$(DEB_PACKAGE) .PHONY: package pkg: @mkdir pkg -pkg/$(DEB_PACKAGE): release | pkg +pkg/$(DEB_PACKAGE): release completion | pkg @cargo deb --no-build --target x86_64-unknown-linux-musl && mv target/x86_64-unknown-linux-musl/debian/$(DEB_PACKAGE) pkg pkg/$(DEB_PACKAGE).minisig: pkg/$(DEB_PACKAGE) -- cgit v1.2.3