mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
plugin: On-boarding default python plugins
plugin: On-boarding default python plugins
This commit is contained in:
parent
8f2c9ce0ed
commit
abcfda133f
9
Makefile
9
Makefile
@ -793,11 +793,12 @@ installdirs:
|
||||
|
||||
# $(PLUGINS) is defined in plugins/Makefile.
|
||||
|
||||
install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS)
|
||||
install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(INSTALL_PROGRAM) $(BIN_PROGRAMS) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(DESTDIR)$(pkglibexecdir)
|
||||
[ -z "$(PLUGINS)" ] || $(INSTALL_PROGRAM) $(PLUGINS) $(DESTDIR)$(plugindir)
|
||||
for PY in $(PY_PLUGINS); do DIR=`dirname $$PY`; $(INSTALL_PROGRAM) $$DIR/*.py $(DESTDIR)$(plugindir)/`basename $$DIR`; done
|
||||
|
||||
MAN1PAGES = $(filter %.1,$(MANPAGES))
|
||||
MAN5PAGES = $(filter %.5,$(MANPAGES))
|
||||
@ -832,7 +833,7 @@ TESTBINS = \
|
||||
# version of `lightningd` leading to bogus results. We bundle up all
|
||||
# built artefacts here, and will unpack them on the tester (overlaying
|
||||
# on top of the checked out repo as if we had just built it in place).
|
||||
testpack.tar.bz2: $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA) config.vars $(TESTBINS) $(DEVTOOLS)
|
||||
testpack.tar.bz2: $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA) config.vars $(TESTBINS) $(DEVTOOLS)
|
||||
tar -caf $@ $^
|
||||
|
||||
uninstall:
|
||||
@ -845,6 +846,10 @@ uninstall:
|
||||
$(ECHO) rm -f $(DESTDIR)$(plugindir)/`basename $$f`; \
|
||||
rm -f $(DESTDIR)$(plugindir)/`basename $$f`; \
|
||||
done
|
||||
@for f in $(PY_PLUGINS); do \
|
||||
$(ECHO) rm -rf $(DESTDIR)$(plugindir)/$$(basename $$(dirname $$f)); \
|
||||
rm -rf $(DESTDIR)$(plugindir)/$$(basename $$(dirname $$f)); \
|
||||
done
|
||||
@for f in $(PKGLIBEXEC_PROGRAMS); do \
|
||||
$(ECHO) rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \
|
||||
rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \
|
||||
|
@ -102,12 +102,16 @@ C_PLUGINS := \
|
||||
plugins/txprepare \
|
||||
plugins/spenderp
|
||||
|
||||
PY_PLUGINS := \
|
||||
plugins/clnrest/clnrest.py
|
||||
|
||||
ifeq ($(HAVE_SQLITE3),1)
|
||||
C_PLUGINS += plugins/sql
|
||||
PLUGIN_ALL_SRC += $(PLUGIN_SQL_SRC)
|
||||
PLUGIN_ALL_HEADER += $(PLUGIN_SQL_HEADER)
|
||||
endif
|
||||
|
||||
# This is non-python plugins (PY_PLUGINS need their whole directory!)
|
||||
PLUGINS := $(C_PLUGINS)
|
||||
PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
|
||||
|
||||
@ -227,8 +231,10 @@ plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_
|
||||
|
||||
# Generated from PLUGINS definition in plugins/Makefile
|
||||
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
|
||||
PLUGIN_BASES := $(PLUGINS:plugins/%=%) $(PY_PLUGINS:plugins/%=%)
|
||||
|
||||
plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile config.vars
|
||||
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(foreach d,$(notdir $(PLUGINS)),\"$d\",) NULL };" > $@)
|
||||
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(PLUGIN_BASES:%=\"%\",) NULL };" > $@)
|
||||
|
||||
CLN_PLUGIN_EXAMPLES := \
|
||||
target/${RUST_PROFILE}/examples/cln-plugin-startup \
|
||||
|
Loading…
Reference in New Issue
Block a user