-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
17 lines (15 loc) · 616 Bytes
/
Makefile
File metadata and controls
17 lines (15 loc) · 616 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
DATADIR = /var/lib/cerca
CONFDIR = /etc/cerca
CONF_FILE = ${CONFDIR}/config.toml
cerca:
go build ./cmd/cerca
install: cerca
@# Run cerca's command to output a default config (with data dir and authkey set) and create the associated default content files
./cerca write-defaults --config '${CONF_FILE}' --data-dir '${DATADIR}'
find '$(DATADIR)' '$(CONFDIR)' -type f -exec chmod 644 {} +
find '$(DATADIR)' '$(CONFDIR)' -type d -exec chmod 755 {} +
id cerca && chown -R cerca:cerca '$(DATADIR)' '$(CONFDIR)'
@# Install binary
install -m755 'cerca' '$(BINDIR)/cerca'