forked from bitraf/bitraf-iot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (23 loc) · 834 Bytes
/
Makefile
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
DESTDIR ?=/usr/local
BROKER ?= mqtt.bitraf.no
PROJECTDIR=$(shell pwd)
DOOR ?= boxy2
all:
%.service: %.service.tmpl
sed -e "s/@DOOR@/${DOOR}/" -e "s/@BROKER@/${BROKER}/" -e "s|@PROJECTDIR@|${PROJECTDIR}|" $< > $@
install-scripts:
mkdir -p $(DESTDIR)/bin
cp bitraf-tv-showmessage $(DESTDIR)/bin
install-tv: install-scripts bitraf-tv-showmessage.service
install-door: install-scripts bitraf-door-subscriber.service
cp bitraf-door-subscriber.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable bitraf-door-subscriber
install-coordinator: bitraf-msgflo.service
cp bitraf-msgflo.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable bitraf-msgflo
install: install-scripts
runtime:
PATH=${PATH}:./node_modules/.bin msgflo --graph graphs/testing.fbp
.PHONY: bitraf-door-subscriber.service