summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-03-11 17:39:54 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-03-11 17:39:54 +0000
commitbac13b388c04a7af9c049c75534bc83c931e2611 (patch)
treedb05c42c006afd373ef5bcf2f1ebc7d13abd4b58 /Makefile
parent2a078069dcfd01c7bf573d53340c8264c3dc4263 (diff)
parent115c62b1d3e0b98020ec4493ce1d9de512a4995a (diff)
downloadgitano-bac13b388c04a7af9c049c75534bc83c931e2611.tar.gz
Merge in rsync work from Codethink
This adds support for Codethink's Trove server's rsync command and also adds a generic plugin interface and repository detection support. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7fa7d11..cab0162 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ LUA_VER := 5.1
LUA := /usr/bin/lua$(LUA_VER)
PREFIX ?= /usr/local
INST_ROOT := $(PREFIX)
+SYSCONF_DIR ?= /etc
# Internal stuff
LUA_MOD_PATH := $(INST_ROOT)/share/lua/$(LUA_VER)
@@ -19,6 +20,7 @@ SHARE_INST_PATH := $(DESTDIR)$(SHARE_PATH)
SKEL_INST_PATH := $(SHARE_INST_PATH)/skel
MAN_PATH := $(INST_ROOT)/share/man
MAN_INST_PATH := $(DESTDIR)$(MAN_PATH)
+PLUGIN_PATH := $(SYSCONF_DIR)/gitano/plugins:$(INST_ROOT)/lib/gitano/plugins
LIB_BINS := gitano-auth gitano-post-receive-hook gitano-update-hook \
gitano-update-ssh gitano-pre-receive-hook gitano-smart-http.cgi \
@@ -43,7 +45,7 @@ MODS := gitano \
gitano.actions gitano.config gitano.lace gitano.log \
gitano.markdown gitano.repository gitano.supple \
gitano.command gitano.admincommand gitano.usercommand \
- gitano.repocommand gitano.copycommand gitano.auth
+ gitano.repocommand gitano.copycommand gitano.auth gitano.plugins
SKEL_FILES := gitano-admin/rules/selfchecks.lace \
gitano-admin/rules/aschecks.lace \
@@ -59,6 +61,9 @@ SKEL_FILES := gitano-admin/rules/selfchecks.lace \
MAN1S := gitano-setup.1
+
+PLUGINS := rsync.lua
+
MOD_DIRS := gitano
MOD_FILES := $(patsubst %,%.lua,$(subst .,/,$(MODS)))
SRC_MOD_FILES := $(patsubst %,lib/%,$(MOD_FILES))
@@ -77,14 +82,14 @@ GEN_BIN := utils/install-lua-bin
RUN_GEN_BIN := $(LUA) $(GEN_BIN) $(LUA)
define GEN_LOCAL_BIN
-$(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $1 $2
+$(RUN_GEN_BIN) $(shell pwd) $(shell pwd)/bin $(shell pwd)/lib $(shell pwd)/plugins $1 $2
chmod 755 $2
endef
define GEN_INSTALL_BIN
-$(RUN_GEN_BIN) $(SHARE_PATH) $(LIB_BIN_PATH) $(LUA_MOD_PATH) $1 $2
+$(RUN_GEN_BIN) $(SHARE_PATH) $(LIB_BIN_PATH) $(LUA_MOD_PATH) $(PLUGIN_PATH) $1 $2
chmod 755 $2
endef
@@ -119,7 +124,7 @@ bin/%: bin/%.in $(GEN_BIN)
testing/%: testing/%.in $(GEN_BIN)
$(call GEN_LOCAL_BIN,$<,$@)
-install: install-bins install-lib-bins install-mods install-skel install-man
+install: install-bins install-lib-bins install-mods install-skel install-man install-plugins
install-man:
mkdir -p $(MAN_INST_PATH)/man1
@@ -143,6 +148,13 @@ install-skel:
install -m 644 skel/$$SKELFILE $(SKEL_INST_PATH)/$$SKELFILE; \
done
+install-plugins:
+ mkdir -p $(DESTDIR)$(INST_ROOT)/lib/gitano/plugins
+ mkdir -p $(DESTDIR)$(SYSCONF_DIR)/gitano/plugins
+ for PLUGIN in $(PLUGINS); do \
+ install -m 644 plugins/$$PLUGIN $(DESTDIR)$(INST_ROOT)/lib/gitano/plugins; \
+ done
+
test: local $(TEST_BINS)
@$(YARN) --env GTT="$$(pwd)/testing/gitano-test-tool" \
--env LUA_PATH="$(LUA_PATH)" --env LUA_CPATH="$(LUA_CPATH)" \