summarylogtreecommitdiffstats
path: root/Makefile
blob: 7d680bbeb958e37f7ba400a137ce3887d70416a9 (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
.PHONY: upload version

upstream_remote = github
upstream_repo = https://github.com/rohankapoorcom/zm-py
upstream_branch = master

aur_remote = aur
aur_repo = aur@aur.archlinux.org:python-zm-py
aur_branch = master

.SRCINFO: PKGBUILD
	mksrcinfo

PKGBUILD: version

version: FORCE
	git remote show $(upstream_remote) >& /dev/null || git remote add $(upstream_remote) $(upstream_repo)
	git fetch $(upstream_remote)
	git describe --tags $(upstream_remote)/$(upstream_branch) | cut -d- -f1 > $@

FORCE:
	

%: %.in
	m4 $< > $*

upload: .SRCINFO PKGBUILD
	git remote show $(aur_remote) >& /dev/null || git remote add $(aur_remote) $(aur_repo)
	git commit -am "`cat version`"
	git push $(aur_remote) HEAD:$(aur_branch)