summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Karlsson2023-09-28 20:51:29 +0200
committerRasmus Karlsson2023-09-28 20:51:29 +0200
commit69bedbea62fb5f449df83741358ec52d608669d4 (patch)
tree213b3ddded2465963fcdfd12c2b9b85b888218c4
parent9f78a9d9401606bd2d86bb2ad740fe065af5ec40 (diff)
downloadaur-69bedbea62fb5f449df83741358ec52d608669d4.tar.gz
add chroot helper in makefile
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ddaadea323a4..f873cba7d1e1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,19 @@
.PHONY: all
-all: clean rebuild srcinfo
+all: clean rebuild srcinfo chroot-rebuild
rebuild:
makepkg -s
+
+chroot-rebuild:
+ @ [ -n "${CHROOT}" ] && \
+ echo "Creating chroot in ${CHROOT}" && \
+ [ -d "${CHROOT}/root" ] || mkarchroot "${CHROOT}/root" base-devel && \
+ arch-nspawn "${CHROOT}/root" pacman -Syu && \
+ makechrootpkg -c -r "${CHROOT}" || \
+ echo "export the CHROOT environment variable if you want to use chroot-rebuild"
+
srcinfo:
makepkg --printsrcinfo > .SRCINFO