From 8acc302135d44c13d36c7f2c3e70b2bd7d0872bf Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 1 Dec 2021 18:28:00 +0100 Subject: [PATCH] buildsys: create buildir atomically Signed-off-by: Thomas Lamprecht --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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} -- 2.39.2