summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGötz Christ2021-10-03 13:04:05 -0500
committerGötz Christ2021-10-03 13:04:31 -0500
commit844e79e91559067d97223e16951f21beacf607bc (patch)
treee3aaa00e08c8bbcd4e781c5594af473a69fa1bb3
parent8fd5a4f9bb70cd81d92291cd45778a7794e62df3 (diff)
downloadaur-844e79e91559067d97223e16951f21beacf607bc.tar.gz
Update Makefile
-rw-r--r--.SRCINFO1
-rw-r--r--Makefile31
2 files changed, 26 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d9470fc3c9e2..37b8eb9c8707 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -14,4 +14,3 @@ pkgbase = pytify
sha256sums = 43d6b596c64c04e5a99a2f79510422f2dcb8d8f1c52f52a42a4b4b1035a69cd5
pkgname = pytify
-
diff --git a/Makefile b/Makefile
index 8a02706c1167..154c4fc67e36 100644
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,49 @@
-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)