-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (23 loc) · 778 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
33
prefix = /usr/local
systemctldir = /etc/systemd/system/
progname = ruuvigw_mqtt_decode
install: $(prefix)/bin/$(progname).pl /etc/$(progname)/ /etc/$(progname)/config.txt /etc/$(progname)/known_tags.txt $(systemctldir)/$(progname).service
$(prefix)/bin/$(progname).pl: $(progname).pl
cp $(progname).pl $(prefix)/bin
chmod 755 $(prefix)/bin/$(progname).pl
$(systemctldir)/$(progname).service: init/$(progname).service
cp init/$(progname).service $(systemctldir)
/etc/$(progname)/%.txt: %.txt
cp -p $< $@
/etc/$(progname)/:
mkdir -p $@
enable:
systemctl enable $(progname).service
disable:
systemctl disable $(progname).service
start:
systemctl start $(progname).service
restart:
systemctl restart $(progname).service
stop:
systemctl stop $(progname).service