1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00
doorlockd-mirror/Makefile
Ralf Ramsauer b9a1bfc566 Publish door state to mqtt
Assisted by nice gpio-wait helper.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-10-07 01:50:41 +02:00

23 lines
703 B
Makefile

DESTDIR ?= /
PREFIX ?= /usr
SYSCONFDIR ?= /etc
all: gpio-wait
sed -i -r -e "s@(^SYSCONFDIR = ').*('$$)@\1$(SYSCONFDIR)\2@" doorlockd
sed -i -r -e "s@(^PREFIX = ').*('$$)@\1$(PREFIX)\2@" doorlockd
gpio-wait: gpio-wait.c
install:
mkdir -p $(DESTDIR)/$(PREFIX)/bin/
mkdir -p $(DESTDIR)/$(PREFIX)/share/
mkdir -p $(DESTDIR)/$(SYSCONFDIR)/systemd/system
mkdir -p $(DESTDIR)/$(SYSCONFDIR)
install doorlockd gpio-wait doorstate $(DESTDIR)/$(PREFIX)/bin/
install doorlockd-passwd $(DESTDIR)/$(PREFIX)/bin/
install -m 0644 doorlockd.cfg $(DESTDIR)/$(SYSCONFDIR)
install -m 0644 doorlockd.service doorstate.service $(DESTDIR)/$(SYSCONFDIR)/systemd/system
cp -av share/* $(DESTDIR)/$(PREFIX)/share