Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon/Makefile: improvements to make distro packaging easier #780

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions daemon/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#SRC contains all *.go *.c *.h files in daemon/ and its subfolders
SRC := $(shell find . -type f -name '*.go' -o -name '*.h' -o -name '*.c')
PREFIX?=/usr/local

all: opensnitchd

install:
@mkdir -p /etc/opensnitchd/rules
@cp opensnitchd /usr/local/bin/
@cp opensnitchd.service /etc/systemd/system/
@cp default-config.json /etc/opensnitchd/
@cp system-fw.json /etc/opensnitchd/
@mkdir -p $(DESTDIR)/etc/opensnitchd/rules
@install -Dm755 opensnitchd \
-t $(DESTDIR)$(PREFIX)/bin/
@install -Dm644 opensnitchd.service \
-t $(DESTDIR)/etc/systemd/system/
@install -Dm644 default-config.json \
-t $(DESTDIR)/etc/opensnitchd/
@install -Dm644 system-fw.json \
-t $(DESTDIR)/etc/opensnitchd/
@systemctl daemon-reload

opensnitchd: $(SRC)
Expand Down