-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 865 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 -m 644 man/dnf.kpatch.8.gz $(MANDIR)
install -d $(CONFDIR)
install -m 644 conf/kpatch.conf $(CONFDIR)
install -d $(DNFPLUGINDIR)
install -m 644 kpatch.py $(DNFPLUGINDIR)
%.gz: %
gzip --keep $^