blob: 222f39a287d7d91e163c2a589b50fe83cb243618 (
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
|
V=2013.08.12
INSTALL_SRC_DIR=parabolaiso/initcpio/install
HOOKS_SRC_DIR=parabolaiso/initcpio/hooks
SCRIPT_SRC_DIR=parabolaiso/initcpio/script
INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio
DOC_DIR=$(DESTDIR)/usr/share/doc/parabolaiso
all: install dist
install: install-program install-initcpio install-examples install-doc
install-program:
install -D -m 755 parabolaiso/mkparabolaiso "$(DESTDIR)/usr/bin/mkparabolaiso"
install-initcpio:
install -d "$(SCRIPT_DIR)" "$(HOOKS_DIR)" "$(INSTALL_DIR)"
install -m 755 -t "$(SCRIPT_DIR)" $(wildcard $(SCRIPT_SRC_DIR)/*)
install -m 644 -t "$(HOOKS_DIR)" $(wildcard $(HOOKS_SRC_DIR)/*)
install -m 644 -t "$(INSTALL_DIR)" $(wildcard $(INSTALL_SRC_DIR)/*)
install-examples:
install -d -m 755 "$(DESTDIR)/usr/share/parabolaiso/"
cp -a --no-preserve=ownership configs "$(DESTDIR)/usr/share/parabolaiso/"
install-doc:
install -d "$(DOC_DIR)"
install -m 644 -t "$(DOC_DIR)" $(wildcard docs/*)
uninstall: uninstall-program uninstall-initcpio uninstall-examples uninstall-doc
uninstall-program:
rm "$(DESTDIR)/usr/bin/mkparabolaiso"
uninstall-initcpio:
$(foreach file,$(wildcard $(SCRIPT_SRC_DIR)/*),rm -r "$(subst $(SCRIPT_SRC_DIR),$(SCRIPT_DIR),$(file))";)
$(foreach file,$(wildcard $(HOOKS_SRC_DIR)/*),rm -r "$(subst $(HOOKS_SRC_DIR),$(HOOKS_DIR),$(file))";)
$(foreach file,$(wildcard $(INSTALL_SRC_DIR)/*),rm -r "$(subst $(INSTALL_SRC_DIR),$(INSTALL_DIR),$(file))";)
uninstall-examples:
rm -rfd "$(DESTDIR)/usr/share/parabolaiso/configs"
rm -d "$(DESTDIR)/usr/share/parabolaiso"
uninstall-doc:
rm -rf "$(DOC_DIR)"
dist:
./expand $(V) dist
dist-branches:
./expand $(V) dist-branches
.PHONY: install install-program install-initcpio install-examples install-doc dist dist-branches uninstall uninstall-program uninstall-initcpio uninstall-examples uninstall-doc
|