motioneye.mk: fix board-specific modules path

This commit is contained in:
Calin Crisan 2018-04-19 23:12:21 +03:00
parent 4f7fb31b22
commit 14a84ada8f

View File

@ -15,8 +15,6 @@ MOTIONEYE_SETUP_TYPE = setuptools
DST_DIR = $(TARGET_DIR)/usr/lib/python2.7/site-packages/motioneye
SHARE_DIR = $(TARGET_DIR)/usr/share/motioneye
BOARD = $(shell basename $(BASE_DIR))
BOARD_DIR = $(BASE_DIR)/../../board/$(BOARD)
COMMON_DIR = $(BASE_DIR)/../../board/common
define MOTIONEYE_INSTALL_TARGET_CMDS
@ -33,7 +31,7 @@ define MOTIONEYE_INSTALL_TARGET_CMDS
cp package/motioneye/servicectl.py $(DST_DIR)
cp package/motioneye/watchctl.py $(DST_DIR)
cp package/motioneye/extractl.py $(DST_DIR)
test -d $(BOARD_DIR)/motioneye-modules && cp $(BOARD_DIR)/motioneye-modules/*.py $(DST_DIR) || true
test -d board/$(BOARD)/motioneye-modules && cp board/$(BOARD)/motioneye-modules/*.py $(DST_DIR) || true
grep servicectl $(DST_DIR)/config.py &>/dev/null || echo -e '\nimport ipctl\nimport servicectl\nimport watchctl\nimport extractl\ntry:\n import boardctl\nexcept ImportError:\n pass' >> $(DST_DIR)/config.py
# log files