-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (27 loc) · 1.13 KB
/
Makefile
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
PROGNM ?= archbuilder
PREFIX ?= /usr
SHRDIR ?= $(PREFIX)/share
BINDIR ?= $(PREFIX)/bin
LIBDIR ?= $(PREFIX)/lib
CNFDIR ?= /etc
ARCHBUILDER_LIB_DIR ?= $(LIBDIR)/$(PROGNM)
ARCHBUILDER_CONF_DIR ?= $(CNFDIR)/$(PROGNM)
ARCHBUILDER_VERSION ?= $(shell git describe --tags || true)
ifeq ($(ARCHBUILDER_VERSION),)
ARCHBUILDER_VERSION := 0.9.5
endif
.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)'
@install -Dm755 archbuilderwrap -t '$(DESTDIR)$(BINDIR)'
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)'