From: Thomas Lamprecht Date: Wed, 1 Dec 2021 17:28:00 +0000 (+0100) Subject: buildsys: create buildir atomically X-Git-Url: https://git.proxmox.com/?p=arch-pacman.git;a=commitdiff_plain;h=8acc302135d44c13d36c7f2c3e70b2bd7d0872bf buildsys: create buildir atomically Signed-off-by: Thomas Lamprecht --- diff --git a/Makefile b/Makefile index de456e4..3b23b12 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,19 @@ DEBS= ${DEB} ${DEB2} all: ${DEBS} echo ${DEBS} -${DEB}: ${SRCTAR} +${SRCDIR}: ${SRCTAR} + rm -rf ${SRCDIR}.tmp + mkdir ${SRCDIR}.tmp + tar xf ${SRCTAR} -C ${SRCDIR}.tmp --strip-components 1 + cp -a debian ${SRCDIR}.tmp/debian + mv ${SRCDIR}.tmp ${SRCDIR} + +.PHONY: builddir +builddir: rm -rf ${SRCDIR} - tar xf ${SRCTAR} - cp -a debian ${SRCDIR}/debian + $(MAKE) ${SRCDIR} + +${DEB}: builddir echo "git clone https://gitlab.archlinux.org/pacman/pacman.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE cd ${SRCDIR}; DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -b -us -uc lintian ${DEBS}