mirror of
https://github.com/Zygo/bees.git
synced 2025-06-15 17:26:15 +02:00
Allow custom libexec location
To install for different distributions, LIBEXEC_PREFIX can now be set. It defaults to $(PREFIX)/usr/lib/bees as used in most common distributions. Local overrides are possible by setting variables in a "localconf" file which will be included by the Makefile if it exists. For some distributions you may want to set it to /usr/libexec or /usr/libexec/bees.
This commit is contained in:
10
Makefile
10
Makefile
@ -1,8 +1,12 @@
|
||||
PREFIX ?= /
|
||||
LIBEXEC_PREFIX ?= $(PREFIX)/usr/lib
|
||||
|
||||
MARKDOWN := $(shell which markdown markdown2 markdown_py 2>/dev/null)
|
||||
MARKDOWN ?= markdown
|
||||
|
||||
# allow local configuration to override above variables
|
||||
-include localconf
|
||||
|
||||
default all: lib src test README.html
|
||||
|
||||
clean: ## Cleanup
|
||||
@ -21,6 +25,9 @@ test: ## Run tests
|
||||
test: lib src
|
||||
$(MAKE) -C test
|
||||
|
||||
scripts/beesd: scripts/beesd.in
|
||||
sed -e's#@LIBEXEC_PREFIX@#$(LIBEXEC_PREFIX)#' -e's#@PREFIX@#$(PREFIX)#' "$<" >"$@"
|
||||
|
||||
README.html: README.md
|
||||
$(MARKDOWN) README.md > README.html.new
|
||||
mv -f README.html.new README.html
|
||||
@ -28,9 +35,10 @@ README.html: README.md
|
||||
install: ## Install bees + libs
|
||||
install: lib src test
|
||||
install -Dm644 lib/libcrucible.so $(PREFIX)/usr/lib/libcrucible.so
|
||||
install -Dm755 bin/bees $(PREFIX)/usr/libexec/bees
|
||||
install -Dm755 bin/bees $(LIBEXEC_PREFIX)/bees/bees
|
||||
|
||||
install_scripts: ## Install scipts
|
||||
install_scripts: scripts/beesd
|
||||
install -Dm755 scripts/beesd $(PREFIX)/usr/sbin/beesd
|
||||
install -Dm644 scripts/beesd.conf.sample $(PREFIX)/etc/bees/beesd.conf.sample
|
||||
install -Dm644 scripts/beesd@.service $(PREFIX)/lib/systemd/system/beesd@.service
|
||||
|
Reference in New Issue
Block a user