forked from archlinux-downgrade/downgrade
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 1.57 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
PANDOC ?= $(shell which pandoc)
setup:
command -v cram || aurget cram
command -v vbump || aurget vbump-git
command -v pandoc || stack install pandoc
potfile: downgrade
xgettext \
--from-code=utf-8 -L shell \
--package-name=downgrade \
--copyright-holder=$(AUTHOR) \
-o downgrade.pot ./downgrade
downgrade.8: doc/downgrade.8.md
$(PANDOC) --standalone --to man doc/downgrade.8.md -o doc/downgrade.8
man: downgrade.8
test:
cram test
install:
install -Dm755 downgrade $(DESTDIR)/$(PREFIX)/bin/downgrade
install -Dm644 doc/downgrade.8 $(DESTDIR)/$(MANPREFIX)/man8/downgrade.8
install -Dm644 completion/bash $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/downgrade
install -Dm644 completion/zsh $(DESTDIR)/$(PREFIX)/share/zsh/site-functions/_downgrade
uninstall:
$(RM) $(DESTDIR)/$(PREFIX)/bin/downgrade \
$(DESTDIR)/$(MANPREFIX)/man8/downgrade.8 \
$(DESTDIR)/$(PREFIX)/share/bash-completion/completions/downgrade \
$(DESTDIR)/$(PREFIX)/share/zsh/site-functions/_downgrade
.PHONY: setup test install uninstall
.PHONY: release.major
release.major: VERSION=$(shell git tag | vbump major | sed 's/^v//')
release.major: release
.PHONY: release.minor
release.minor: VERSION=$(shell git tag | vbump minor | sed 's/^v//')
release.minor: release
.PHONY: release.match
release.patch: VERSION=$(shell git tag | vbump patch | sed 's/^v//')
release.patch: release
.PHONY: release
release: test
[ -n "$(VERSION)" ]
git tag -s -m v$(VERSION) v$(VERSION)
git push --follow-tags
aur-release downgrade "$(VERSION)"