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

add RC_DIR variable to Makefile (to facilitate packaging for NixOS) #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ POLKIT_DIR := /usr/share/polkit-1/actions
POLKIT_POLICY_FILE := com.github.swhkd.pkexec.policy
# Remember to edit the TARGET_DIR in policy file too if you do change it.
TARGET_DIR := /usr/bin
RC_DIR := /etc/$(DAEMON_BINARY)
MAN1_DIR := /usr/share/man/man1
MAN5_DIR := /usr/share/man/man5
VERSION = $(shell awk -F ' = ' '$$1 ~ /version/ { gsub(/["]/, "", $$2); printf("%s",$$2) }' Cargo.toml)
Expand All @@ -19,10 +20,10 @@ install:
@mkdir -p $(MAN5_DIR)
@mkdir -p $(POLKIT_DIR)
@mkdir -p $(TARGET_DIR)
@mkdir -p /etc/$(DAEMON_BINARY)
@mkdir -p $(RC_DIR)
@find ./docs -type f -iname "*.1.gz" -exec cp {} $(MAN1_DIR) \;
@find ./docs -type f -iname "*.7.gz" -exec cp {} $(MAN7_DIR) \;
@touch /etc/$(DAEMON_BINARY)/$(DAEMON_BINARY)rc
@touch $(RC_DIR)/$(DAEMON_BINARY)rc
@cp ./target/release/$(DAEMON_BINARY) $(TARGET_DIR)
@cp ./target/release/$(SERVER_BINARY) $(TARGET_DIR)
@cp ./$(POLKIT_POLICY_FILE) $(POLKIT_DIR)/$(POLKIT_POLICY_FILE)
Expand Down