From a148f8edde0d1165578145909ef394a0c5b12fa8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 16 Sep 2018 09:49:51 +0200 Subject: [PATCH] Makefile: Fix the 'make install' target This fixes the 'make install' target to work on a typical RHEL or Fedora system. We now by default install to a prefix of /usr instead of /usr/local The prefix is overridable like so: $ make install PREFIX=/opt/ --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30ea921a..2dd0f552 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ PYTHON ?= /usr/bin/python3 DESTDIR ?= / +PREFIX ?= /usr +mandir ?= $(PREFIX)/share/man PKGNAME = lorax VERSION = $(shell awk '/Version:/ { print $$2 }' $(PKGNAME).spec) @@ -19,7 +21,7 @@ all: src/pylorax/version.py src/composer/version.py $(PYTHON) setup.py build install: all - $(PYTHON) setup.py install --root=$(DESTDIR) + $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) mkdir -p $(DESTDIR)/$(mandir)/man1 install -m 644 docs/man/lorax.1 $(DESTDIR)/$(mandir)/man1 install -m 644 docs/man/livemedia-creator.1 $(DESTDIR)/$(mandir)/man1