-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
54 lines (44 loc) · 1.28 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
PREFIX = /usr/local
SHAREDIR = $(PREFIX)/share/archlinux
BINDIR = $(PREFIX)/bin
REPO = contrib
TAG = $(shell git describe --abbrev=0 --tags)
BASH_SCRIPTS = \
admin/checkservices \
aur/review \
package/parse-submodules \
package/pkgsearch \
package/rebuild-todo
PYTHON_SCRIPTS = \
package/staging2testing \
security/security-tracker-check \
package/cleanup-list \
package/srcinfo-pkg-graph
SCRIPTS = \
$(BASH_SCRIPTS) $(PYTHON_SCRIPTS)
.PHONY: install
install:
for script in $(SCRIPTS); do \
install -Dm755 $${script} -t $(DESTDIR)$(BINDIR)/; \
done;
.PHONY: uninstall
uninstall:
for script in $(SCRIPTS); do \
rm -rf $(DESTDIR)$(BINDIR)/$${script#*/}; \
done;
rmdir $(DESTDIR)$(BINDIR)
.PHONY: tag
tag:
git describe --exact-match >/dev/null 2>&1 || git tag -s $(shell date +%Y%m%d)
git push --tags
.PHONY: release
release:
mkdir -p releases
git archive --prefix=${REPO}-${TAG}/ -o releases/${REPO}-${TAG}.tar.gz ${TAG};
gpg --detach-sign -o releases/${REPO}-${TAG}.tar.gz.sig releases/${REPO}-${TAG}.tar.gz
hub release create -m "Release: ${TAG}" -a releases/${REPO}-${TAG}.tar.gz.sig -a releases/${REPO}-${TAG}.tar.gz ${TAG}
check: check-bash check-python
check-bash: $(BASH_SCRIPTS)
shellcheck $^
check-python: $(PYTHON_SCRIPTS)
flake8 --ignore E123,E126,E128,E305,E501 $^