blob: bab560fed37480be0488323051bc1351a6f3e236 (
plain) (
blame)
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
65
66
67
68
69
70
71
72
73
|
PREFIX = /usr
BIN = /bin
DATA = /share
LICENSES = $(DATA)/licenses
COMMAND = bfind
PKGNAME = bfind
PY3_SHEBANG = /usr/bin/env/ python3
.PHONY: all
all: cmd doc
.PHONY: cmd
cmd: bfind
.PHONY: doc
doc: info
.PHONY: info
info: bfind.info.gz
%.info.gz: info/%.texinfo.install
makeinfo "$<"
gzip -9 -f "$*.info"
info/%.texinfo.install: info/%.texinfo
cp "$<" "$@"
sed -i 's:^@set COMMAND bfind:@set COMMAND $(COMMAND):g' "$@"
bfind: src/bfind.py
cp "$<" "$@"
sed -i 's:/usr/bin/env/ python3:$(PY3_SHEBANG):' "$@"
.PHONY: install
install: install-core install-doc
.PHONY: install-core
install-core: install-cmd install-license
.PHONY: install-cmd
install-cmd: bfind
install -d -- "$(DESTDIR)$(PREFIX)$(BIN)"
install -m755 -- bfind "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)"
.PHONY: install-license
install-license:
install -d -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)"
install -m644 -- COPYING LICENSE "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)"
.PHONY: install-doc
install-doc: install-info
.PHONY: install-info
install-info: bfind.info.gz
install -dm755 -- "$(DESTDIR)$(PREFIX)$(DATA)/info"
install -m644 bfind.info.gz -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz"
.PHONY: uninstall
uninstall:
-rm -- "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)"
-rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/COPYING"
-rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/LICENSE"
-rm -d -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)"
-rm -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz"
.PHONY: clean
clean:
-rm -- bfind bfind.info.gz info/*.install
|