2021-06-29 20:01:25 +02:00
|
|
|
PROGNM ?= archbuilder
|
|
|
|
PREFIX ?= /usr
|
|
|
|
SHRDIR ?= $(PREFIX)/share
|
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
2021-06-29 20:22:42 +02:00
|
|
|
CNFDIR ?= /etc
|
2021-06-29 20:01:25 +02:00
|
|
|
ARCHBUILDER_LIB_DIR ?= $(LIBDIR)/$(PROGNM)
|
|
|
|
ARCHBUILDER_CONF_DIR ?= $(CNFDIR)/$(PROGNM)
|
2021-07-01 12:32:51 +02:00
|
|
|
ARCHBUILDER_VERSION ?= $(shell git describe --tags || true)
|
|
|
|
ifeq ($(ARCHBUILDER_VERSION),)
|
2021-07-18 22:48:42 +02:00
|
|
|
ARCHBUILDER_VERSION := 0.9.5
|
2021-07-01 12:32:51 +02:00
|
|
|
endif
|
2021-06-29 20:01:25 +02:00
|
|
|
|
|
|
|
.PHONY: install build archbuilder
|
|
|
|
|
|
|
|
build: archbuilder
|
|
|
|
|
|
|
|
archbuilder: archbuilder.in
|
|
|
|
sed -e 's|ARCHBUILDER_LIB_DIR|$(ARCHBUILDER_LIB_DIR)|' \
|
|
|
|
-e 's|ARCHBUILDER_CONF_DIR|$(ARCHBUILDER_CONF_DIR)|' \
|
|
|
|
-e 's|ARCHBUILDER_VERSION|$(ARCHBUILDER_VERSION)|' $< >$@
|
|
|
|
|
|
|
|
install-archbuilder: archbuilder
|
|
|
|
@install -Dm755 archbuilder -t '$(DESTDIR)$(BINDIR)'
|
2021-06-29 22:51:24 +02:00
|
|
|
@install -Dm755 archbuilderwrap -t '$(DESTDIR)$(BINDIR)'
|
2021-06-29 20:01:25 +02:00
|
|
|
|
|
|
|
install: install-archbuilder
|
|
|
|
@install -Dm644 lib/archbuilder.inc.sh -t '$(DESTDIR)$(LIBDIR)/$(PROGNM)'
|
|
|
|
@install -Dm644 lib/buildah.inc.sh -t '$(DESTDIR)$(LIBDIR)/$(PROGNM)'
|
|
|
|
@install -Dm644 lib/ext/slog.sh -t '$(DESTDIR)$(LIBDIR)/$(PROGNM)/ext'
|
|
|
|
@install -Dm644 lib/ext/bash_log_internals.inc.sh -t '$(DESTDIR)$(LIBDIR)/$(PROGNM)/ext'
|
|
|
|
@install -Dm644 archbuilder.env -t '$(DESTDIR)$(CNFDIR)/$(PROGNM)'
|