1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 02:14:26 +01:00

Add Makefile

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
Ralf Ramsauer 2018-09-05 19:58:54 +00:00
parent f857fffac6
commit 03648bf821

19
Makefile Normal file
View File

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