summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGötz Christ2021-10-03 13:07:44 -0500
committerGötz Christ2021-10-03 13:07:58 -0500
commit1d68cf5686ded945b46fe3c37753e491c1c553a2 (patch)
treec8ef9e2542c1f9a068694d38eea2c521f8edc9f0
parent108cfa6d9ada22a30e6c743f565c5d1a6e28b605 (diff)
downloadaur-1d68cf5686ded945b46fe3c37753e491c1c553a2.tar.gz
Update Makefile
with basic test target
-rw-r--r--Makefile35
1 files changed, 30 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8a02706c1167..a5796f034d29 100644
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,53 @@
-all: clean build git install
+.PHONY: all
+all: build git install
+.PHONY: clean
clean:
rm -r src pkg || true
+.PHONY: geninteg
geninteg:
sed -i '/.*sums=(/,$$d' PKGBUILD
makepkg --geninteg >> PKGBUILD
+.PHONY: srcinfo
srcinfo:
makepkg --printsrcinfo > .SRCINFO
+.PHONY: makepkg
makepkg:
makepkg -s
+.PHONY: build
build: geninteg srcinfo makepkg
+.PHONY: git
git: git_add git_commit
+.PHONY: git_add
git_add:
- git add PKGBUILD .SRCINFO
+ git add PKGBUILD .SRCINFO Makefile
-git_commit: VERSION = $(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]')
+.PHONY: git_commit
+git_commit: VERSION = "$(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | xargs)"
+git_commit: GIT_STATUS = "$(shell git status --porcelain)"
git_commit:
- git commit -m "Update to ${VERSION}"
+ [ -n ${GIT_STATUS} ] && git commit -m "Update to ${VERSION}"
+.PHONY: install
install:
- makepkg --install
+ makepkg --repackage --install --force
+
+.PHONY: open
+open: URL = "$(shell grep url .SRCINFO | cut -d '=' -f 2 | xargs)"
+open:
+ xdg-open $(URL)
+
+.PHONY: run
+run: NAME = "$(shell grep pkgname .SRCINFO | cut -d '=' -f 2 | xargs)"
+run:
+ env $(NAME) --help
+
+.PHONY: test
+test:
+ make run