blob: bc726a6e904652b4db0ddf545c61e13e936e99a0 (
plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#
# SPDX-License-Identifier: GPL-3.0-or-later
PREFIX ?= /usr/local
BIN_DIR=$(DESTDIR)$(PREFIX)/bin
DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso
MAN_DIR?=$(DESTDIR)$(PREFIX)/share/man
PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso
DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \
$(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*)
VERSION?=$(shell git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;s/\.r0\.g.*//')
all:
check: shellcheck
shellcheck:
shellcheck -s bash $(SCRIPT_FILES)
install: install-scripts install-profiles install-doc install-man
install-scripts:
install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/"
install -vDm 755 scripts/run_archiso.sh "$(BIN_DIR)/run_archiso"
install-profiles:
install -d -m 755 $(PROFILE_DIR)
cp -a --no-preserve=ownership configs $(PROFILE_DIR)/
install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
install-man:
@printf '.. |version| replace:: %s\n' '$(VERSION)' > man/version.rst
install -d -m 755 $(MAN_DIR)/man1
rst2man man/mkarchiso.1.rst $(MAN_DIR)/man1/mkarchiso.1
uninstall: uninstall-scripts uninstall-profiles uninstall-doc
uninstall-scripts:
-rm -rf "${BIN_DIR}/mkarchiso"
-rm -rf "${BIN_DIR}/run_archiso"
uninstall-profiles:
-rm -rf "${PROFILE_DIR}"
uninstall-doc:
-rm -rf "${DOC_DIR}"
uninstall-man:
-rm -rf "${MAN_DIR}/man1/mkarchiso.1
V=$(shell git describe --exact-match)
dist:
git archive --format=tar --prefix=archiso32-$(V)/ $(V) | gzip -9 > archiso32-$(V).tar.gz
gpg --detach-sign --use-agent archiso32-$(V).tar.gz
upload:
scp archiso32-$(V).tar.gz archiso32-$(V).tar.gz.sig sources.archlinux32.org:sources/
.PHONY: check install install-doc install-man install-profiles install-scripts shellcheck uninstall uninstall-doc uninstall-man uninstall-profiles uninstall-scripts dist upload
|