From 60cd9c6165cfcc102d5759c40417e871bf971860 Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Wed, 10 Jan 2018 22:35:22 +0100 Subject: [PATCH] Installation: Introduce DESTDIR into Makefile In Gentoo, usage of DESTDIR is automatically handled by the build system to support installation into a clean image from which the package is created. Thus, let's add DESTDIR to the install targets. One can now correctly install bees with packaging systems simply by running: $ DESTDIR=/tmp/bees-image make all install This will no longer mess up with the PREFIX setting. CC: Timofey Titovets Signed-off-by: Kai Krakow --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0eb3cdf..899748c 100644 --- a/Makefile +++ b/Makefile @@ -36,14 +36,14 @@ README.html: README.md install_bees: ## Install bees + libs install_bees: lib src test - install -Dm644 lib/libcrucible.so $(PREFIX)/usr/lib/libcrucible.so - install -Dm755 bin/bees $(LIBEXEC_PREFIX)/bees + install -Dm644 lib/libcrucible.so $(DESTDIR)$(PREFIX)/usr/lib/libcrucible.so + install -Dm755 bin/bees $(DESTDIR)$(LIBEXEC_PREFIX)/bees install_scripts: ## Install scipts install_scripts: scripts - 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 + install -Dm755 scripts/beesd $(DESTDIR)$(PREFIX)/usr/sbin/beesd + install -Dm644 scripts/beesd.conf.sample $(DESTDIR)$(PREFIX)/etc/bees/beesd.conf.sample + install -Dm644 scripts/beesd@.service $(DESTDIR)$(PREFIX)/lib/systemd/system/beesd@.service install: ## Install distribution install: install_bees install_scripts