mirror of
https://github.com/haad/proxychains.git
synced 2026-09-13 18:45:50 +05:00
Add zsh completion script
Refer <https://www.gnu.org/software/automake/manual/automake.html#Third_002dParty-Makefiles>, use install-exec
This commit is contained in:
parent
1f04b93d35
commit
02409fba79
12
Makefile
12
Makefile
@ -9,9 +9,11 @@ prefix = /usr/local
|
||||
includedir = $(prefix)/include
|
||||
libdir = $(prefix)/lib
|
||||
confdir = $(prefix)/etc
|
||||
datadir = $(prefix)/share
|
||||
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/bin
|
||||
zshcompdir = $(datadir)/zsh/site-functions
|
||||
|
||||
SRCS = $(sort $(wildcard src/*.c))
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
@ -46,7 +48,9 @@ CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DINSTALL_PREFIX=\"$(prefix)\" -DDLL_NAME=\"
|
||||
all: $(ALL_LIBS) $(ALL_TOOLS)
|
||||
|
||||
#install: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(DESTDIR)$(LDSO_PATHNAME)
|
||||
install:
|
||||
install: install-exec install-config install-zsh-completion
|
||||
|
||||
install-exec:
|
||||
install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(confdir) $(DESTDIR)/$(includedir)
|
||||
install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) $(DESTDIR)/$(bindir)/
|
||||
install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(DESTDIR)/$(libdir)/
|
||||
@ -55,6 +59,10 @@ install-config:
|
||||
install -d $(DESTDIR)/$(confdir)
|
||||
install $(INSTALL_FLAGS) 644 src/proxychains.conf $(DESTDIR)/$(confdir)/
|
||||
|
||||
install-zsh-completion:
|
||||
install -d $(DESTDIR)/$(zshcompdir)
|
||||
install $(INSTALL_FLAGS) 644 completions/zsh/_proxychains4 -t $(DESTDIR)/$(zshcompdir)
|
||||
|
||||
clean:
|
||||
rm -f $(ALL_LIBS)
|
||||
rm -f $(ALL_TOOLS)
|
||||
@ -70,6 +78,6 @@ $(LDSO_PATHNAME): $(LOBJS)
|
||||
$(ALL_TOOLS): $(OBJS)
|
||||
$(CC) src/main.o src/common.o -o $(PXCHAINS)
|
||||
|
||||
.PHONY: all clean install install-config
|
||||
.PHONY: all clean install install-exec install-config install-zsh-completion
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
3
completions/zsh/_proxychains4
Normal file
3
completions/zsh/_proxychains4
Normal file
@ -0,0 +1,3 @@
|
||||
#compdef proxychains4
|
||||
|
||||
_arguments -s -S '1: :{_command_names -e}' '*:: :_normal'
|
||||
Loading…
Reference in New Issue
Block a user