-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The intent is mainly to automate the installation and/or packaging process. Signed-off-by: Julien Thierry <jthierry@redhat.com>
- Loading branch information
Julien Thierry
committed
Aug 24, 2020
1 parent
1c9aefe
commit 7484eb1
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
PREFIX ?= /usr/local | ||
|
||
MANDIR = $(addprefix $(DESTDIR),$(PREFIX)/share/man/man8) | ||
CONFDIR = $(addprefix $(DESTDIR),/etc/dnf/plugins) | ||
|
||
ifeq (, $(PYTHONSITES)) | ||
PYTHON = $(shell command -v python3) | ||
ifeq (, $(PYTHON)) | ||
$(error "No python3 installation found.") | ||
endif | ||
|
||
PY_MAJOR = $(basename $(lastword $(shell $(PYTHON) --version))) | ||
PYTHON_PREFIX = $(dir $(subst /bin/,/bin,$(dir $(PYTHON)))) | ||
|
||
PYTHONSITES = $(addsuffix lib/python$(PY_MAJOR)/site-packages,$(PYTHON_PREFIX)) | ||
endif | ||
|
||
DNFPLUGINDIR = $(addprefix $(DESTDIR),$(PYTHONSITES)/dnf-plugins) | ||
|
||
TARGETS = kpatch.py conf/kpatch.conf man/dnf.kpatch.8.gz | ||
|
||
all: $(TARGETS) | ||
|
||
install: $(TARGETS) | ||
install -d $(MANDIR) | ||
install man/dnf.kpatch.8.gz $(MANDIR) | ||
install -d $(CONFDIR) | ||
install conf/kpatch.conf $(CONFDIR) | ||
install -d $(DNFPLUGINDIR) | ||
install kpatch.py $(DNFPLUGINDIR) | ||
|
||
%.gz: % | ||
gzip --keep $^ |