-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (31 loc) · 961 Bytes
/
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
33
34
35
36
37
38
39
40
app_version = 1.2.1
sdistfiles = verso.pl verso.conf verso.desktop README.md CHANGES.md Makefile LICENSE.txt
bin = $(DESTDIR)/usr/bin/verso
conf = $(DESTDIR)/etc/verso.conf
desktop = $(DESTDIR)/usr/share/applications/verso.desktop
man = $(DESTDIR)/usr/share/man/man1/verso.1.gz
.PHONY: all
all: verso.1.gz
.PHONY: sdist
sdist: dist/verso-$(app_version).tar.gz
dist/verso-$(app_version).tar.gz: $(sdistfiles)
@mkdir -p dist/verso-$(app_version)/
@cp $^ dist/verso-$(app_version)/
@tar -C dist/ -czf $@ verso-$(app_version)/
verso.1.gz: verso.pl
@pod2man $^ | gzip -9 > $@
.PHONY: install
install: verso.pl verso.conf verso.desktop verso.1.gz
@install -Dm 755 verso.pl $(bin)
@install -Dm 644 verso.conf $(conf)
@install -Dm 644 verso.desktop $(desktop)
@install -Dm 644 verso.1.gz $(man)
.PHONY: clean
clean:
@rm -rf verso.1.gz dist/
.PHONY: uninstall
uninstall:
@rm -f $(bin) $(desktop) $(man)
.PHONY: purge
purge: uninstall
@rm -f $(conf)