mirror of
https://github.com/Zygo/bees.git
synced 2025-07-06 10:32:25 +02:00
Add configurable bindir for distros without sbin
Adds a `BINDIR` Make variable, defaulting to `sbin`, allowing packagers to override the install location of `beesd` for systems that do not use `/sbin`. This affects the install path and systemd unit template.
This commit is contained in:
committed by
Zygo Blaxell
parent
ee5c971d77
commit
f9f3913c8b
@ -4,6 +4,7 @@ define TEMPLATE_COMPILER =
|
||||
sed $< >$@ \
|
||||
-e's#@DESTDIR@#$(DESTDIR)#' \
|
||||
-e's#@PREFIX@#$(PREFIX)#' \
|
||||
-e's#@BINDIR@#$(BINDIR)#' \
|
||||
-e's#@ETC_PREFIX@#$(ETC_PREFIX)#' \
|
||||
-e's#@LIBEXEC_PREFIX@#$(LIBEXEC_PREFIX)#'
|
||||
endef
|
||||
|
3
Makefile
3
Makefile
@ -1,6 +1,7 @@
|
||||
PREFIX ?= /usr
|
||||
ETC_PREFIX ?= /etc
|
||||
LIBDIR ?= lib
|
||||
BINDIR ?= sbin
|
||||
|
||||
LIB_PREFIX ?= $(PREFIX)/$(LIBDIR)
|
||||
LIBEXEC_PREFIX ?= $(LIB_PREFIX)/bees
|
||||
@ -55,7 +56,7 @@ install_bees: src $(RUN_INSTALL_TESTS)
|
||||
|
||||
install_scripts: ## Install scipts
|
||||
install_scripts: scripts
|
||||
install -Dm755 scripts/beesd $(DESTDIR)$(PREFIX)/sbin/beesd
|
||||
install -Dm755 scripts/beesd $(DESTDIR)$(PREFIX)/$(BINDIR)/beesd
|
||||
install -Dm644 scripts/beesd.conf.sample $(DESTDIR)$(ETC_PREFIX)/bees/beesd.conf.sample
|
||||
ifneq ($(SYSTEMD_SYSTEM_UNIT_DIR),)
|
||||
install -Dm644 scripts/beesd@.service $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/beesd@.service
|
||||
|
@ -5,7 +5,7 @@ After=sysinit.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=@PREFIX@/sbin/beesd --no-timestamps %i
|
||||
ExecStart=@PREFIX@/@BINDIR@/beesd --no-timestamps %i
|
||||
CPUAccounting=true
|
||||
CPUSchedulingPolicy=batch
|
||||
CPUWeight=12
|
||||
|
Reference in New Issue
Block a user