summarylogtreecommitdiffstats
path: root/Makefile
blob: d64d9e3fb2ec2a73df682688d3abc1a52f9c5d77 (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
PKG:=$(lastword $(subst /, ,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))

.PHONY: upload clean

all: src

clean: .SRCINFO ${PKG}.git PKGBUILD src
	rm -Rf $^

upload: .${PKG}.git .SRCINFO
	GIT_DIR=$< GIT_WORK_TREE=$(@D) git commit -a
	GIT_DIR=$< GIT_WORK_TREE=$(@D) git push origin master

.%.git:
	git clone --bare ssh://aur@aur.archlinux.org/$* $@

src: PKGBUILD
	makepkg -do

.SRCINFO: PKGBUILD
	mksrcinfo

%: %.in
	m4 $< > $*