summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-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