File: rules

package info (click to toggle)
gophian 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 460 kB
  • sloc: python: 2,038; makefile: 37
file content (42 lines) | stat: -rwxr-xr-x 1,436 bytes parent folder | download
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
38
39
40
41
42
#!/usr/bin/make -f

export PYBUILD_NAME=gophian

define BASH_COMPLETIONS_SCRIPT
from click.shell_completion import shell_complete;
from gophian.cli import cli;
shell_complete(cli, None, "gophian", "_GOPHIAN_COMPLETE", "bash_source");
endef

define FISH_COMPLETIONS_SCRIPT
from click.shell_completion import shell_complete;
from gophian.cli import cli;
shell_complete(cli, None, "gophian", "_GOPHIAN_COMPLETE", "fish_source");
endef

define ZSH_COMPLETIONS_SCRIPT
from click.shell_completion import shell_complete;
from gophian.cli import cli;
shell_complete(cli, None, "gophian", "_GOPHIAN_COMPLETE", "zsh_source");
endef

export BASH_COMPLETIONS_SCRIPT
export FISH_COMPLETIONS_SCRIPT
export ZSH_COMPLETIONS_SCRIPT

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_clean:
	$(MAKE) -C man clean

execute_after_dh_auto_build:
	$(MAKE) -C man

execute_after_dh_auto_install:
	mkdir -p debian/gophian/usr/share/bash-completion/completions/
	PYTHON_PATH=$(CURDIR) python3 -c "$$BASH_COMPLETIONS_SCRIPT" > debian/gophian/usr/share/bash-completion/completions/gophian
	mkdir -p debian/gophian/usr/share/fish/vendor_completions.d/
	PYTHON_PATH=$(CURDIR) python3 -c "$$FISH_COMPLETIONS_SCRIPT" > debian/gophian/usr/share/fish/vendor_completions.d/gophian.fish
	mkdir -p debian/gophian/usr/share/zsh/vendor-completions/
	PYTHON_PATH=$(CURDIR) python3 -c "$$ZSH_COMPLETIONS_SCRIPT" > debian/gophian/usr/share/zsh/vendor-completions/_gophian