[pve-devel] [PATCH iproute2 3/5] build: add dsc target

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Dec 19 13:28:42 CET 2018


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

diff --git a/Makefile b/Makefile
index 041c16a..32ad46f 100644
--- a/Makefile
+++ b/Makefile
@@ -7,10 +7,14 @@ BUILDDIR=${SRCDIR}.tmp
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
-DEBS=							\
+MAIN_DEB=iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
+OTHER_DEBS=\
 	iproute2-doc_${VERSION}-${PKGREL}_all.deb	\
 	iproute2-dbgsym_${VERSION}-${PKGREL}_all.deb	\
-	iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
+
+DEBS=${MAIN_DEB} ${OTHER_DEBS}
+
+DSC=${PACKAGE}_${VER}-${PKGREL}.dsc
 
 all: ${DEBS}
 	echo ${DEBS}
@@ -19,13 +23,24 @@ all: ${DEBS}
 submodule:
 	test -f "${SRCDIR}/README" || git submodule update --init
 
-.PHONY: deb
-${DEBS} deb: | submodule
+${BUILDDIR}: | submodule
 	rm -rf $(BUILDDIR)
 	cp -a $(SRCDIR) $(BUILDDIR)
 	cp -a debian $(BUILDDIR)/debian
+
+.PHONY: deb
+deb: ${DEBS}
+${OTHER_DEBS}: ${MAIN_DEBS}
+${MAIN_DEB}: ${BUILDDIR}
 	cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+	cd ${BUILDDIR}; tar czf ../${PACKAGE}_${VER}.orig.tar.gz *
+	cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d
+	lintian $@
+
 .PHONY: upload
 upload: ${DEBS}
 	tar cf - ${DEBS} | ssh repoman at repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
@@ -33,7 +48,7 @@ upload: ${DEBS}
 .PHONY: clean distclean
 distclean: clean
 clean:
-	rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo
+	rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo *.orig.tar.* *.debian.tar.*
 
 .PHONY: dinstall
 dinstall: deb
-- 
2.19.2





More information about the pve-devel mailing list