[pve-devel] [PATCH corosync-pve 06/10] build: add dsc target

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Nov 7 14:26:33 CET 2018


to build a source package

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 Makefile | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index d281712..d5b9c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -36,21 +36,32 @@ libsam-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
 libtotem-pg-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
 libvotequorum-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
 
+DSC=corosync-pve_${CSVERSION}-${CSRELEASE}.dsc
+
 all: ${DEBS}
 	echo ${DEBS}
 
+${CSDIR}: ${CSSRC} patches changelog.Debian
+	rm -rf $@ $@.tmp
+	mkdir $@.tmp
+	tar -C $@.tmp --strip-components=1 -xf ${CSSRC}
+	mv $@.tmp/debian/changelog $@.tmp/debian/changelog.org
+	cat changelog.Debian $@.tmp/debian/changelog.org > $@.tmp/debian/changelog
+	cd $@.tmp; ln -s ../patches patches
+	cd $@.tmp; quilt push -a
+	cd $@.tmp; rm -rf .pc ./patches
+	mv $@.tmp $@
+
 .PHONY: deb
 deb: ${DEBS}
-${DEBS}: ${CSSRC}
-	rm -rf ${CSDIR}
-	tar xf ${CSSRC}
-	mv ${CSDIR}/debian/changelog ${CSDIR}/debian/changelog.org
-	cat changelog.Debian ${CSDIR}/debian/changelog.org > ${CSDIR}/debian/changelog
-	cd ${CSDIR}; ln -s ../patches patches
-	cd ${CSDIR}; quilt push -a
-	cd ${CSDIR}; rm -rf .pc ./patches
+${DEBS}: ${CSDIR}
 	cd ${CSDIR}; dpkg-buildpackage -b -us -uc
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${CSDIR}
+	cd ${CSDIR}; dpkg-buildpackage -S -us -uc -d -nc
+
 .PHONY: download
 download:
 	rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
-- 
2.19.1





More information about the pve-devel mailing list